Hi Moishe, The following query will solve your provlem.
Select a.* from a left join b on a.c = b.c where b.c is null; Anvar. At 09:53 PM 01/11/2001 -0800, you wrote: >Perhaps this is more of a general SQL question than a MySQL specific one, >and I may be exposing my ignorance by asking this, but I figure it's worth a >shot. > >I have two tables, 'a' and 'b'. Each contains a value 'c'. I want to >select all 'a' rows where a.c is not in the set of b.c. Is this possible >using a single query? What I do now is select all the b.c values, build up >a where clause from those results, then select from a, but it's an extra >query I'd rather not do. > >Thanks for any help anyone out there can provide. > >-Moishe > > >--------------------------------------------------------------------- >Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail ><[EMAIL PROTECTED]> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php