find id which are not available in other mysql table

find id which are not available in other mysql table

 

Select from one table where not in another

Mysql: Select rows from a table that are not in another

 

Solution:

SELECT * FROM member_info AS a WHERE NOT EXISTS ( SELECT * FROM mem_password AS b WHERE a.mem_name=b.mem_name ) and a.version='7.2.2' and a.mem_role='admin'

 

 

 

 

*********************************************************************************************************

Find all row which are not avilable in  another table:

SELECT member_info.mem_name FROM member_info WHERE member_info.mem_name NOT IN 

(SELECT mem_password.mem_name FROM mem_password )


************************************************************

not tasted it ..

How to JOIN two table to get missing rows in the second table

 

 

 

 

Author: joker