SELECT Table1.ID FROM Table1 LEFT OUTER JOIN Table2 ON Table1.ID=Table2.ID WHERE Table2.ID IS NULL;
> -----Original Message----- > From: Henning Sittler [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 10:16 AM > To: 'mysql users' > Subject: MySQL: Select Not In Table > > > Just wondering if anyone knows of a work around for selecting > rows in Table1 that have an ID column value which is not > found in the ID column of Table2. I have seen a workaround > for selecting similar rows IN both tables, but I want NOT IN. > > This would be a work around to the sql subselect query in the > following > statement: > > SELECT Table1.ID FROM Table1 WHERE Table1.ID NOT IN (SELECT > Table2.ID FROM Table2); > > Thanks for any help! > > > > --------------------------------------------------------------------- > 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