Having problem with simple "NOT IN" query

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello all,

I have two tables

tab_a  id(int)
tab_b  id(int)

and I try the following select which returns an error:

SELECT id from tab_a
where id NOT IN
(select id from tab_b);

#1064 - You have an error in your SQL syntax.  Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'select id from tab_b) LIMIT 0, 30' at line 3

Please advise.



Re: Having problem with simple "NOT IN" query

Its ok folks I got it sorted, thanks anyway.

Site Timeline