Re: MySQL: Select Not In Table

2002-12-03 Thread Listen Hinz
Dear Henning, SELECT Table1.ID FROM Table1 WHERE Table1.ID NOT IN (SELECT Table2.ID FROM Table2); SELECT Table1.ID FROM Table1 LEFT JOIN Table2 USING (ID) WHERE Table2.ID IS NULL Hope it helps, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de

Re: MySQL: Select Not In Table

2002-12-03 Thread gerald_clark
SELECT Table1.ID FROM Table1 LEFT JOIN Table2 ON Table1.ID = TRable2.ID where Table2.ID IS NULL; Henning Sittler wrote: 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

RE: MySQL: Select Not In Table

2002-12-03 Thread Henning Sittler
Thanks to all those who have responded! This is the sql query I am looking for. It's good to have such a user mail list. SELECT Table1.ID FROM Table1 LEFT JOIN Table2 Using(ID) WHERE Table2.ID IS NULL when you do a left join, if there is no cooresponding row in the second table, then a

RE: MySQL: Select Not In Table

2002-12-03 Thread Adolfo Bello
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