Sorry I missed out the difficult bit, query sould read:- SELECT table1.*,table2.id from Table1 AS table1,Table2 AS table2 WHERE table1.otherkeyid = '7236523' AND table2.otherkeyid = '7236523' AND table1.id DOESN'T EXIST IN table2.id;
If there are NO entries in table2 for otherkeyid I still want to get table1.* Regards Marty ----- Original Message ----- From: "Martin Moss" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 02, 2003 9:49 PM Subject: Select from one table where ID not in another table > All, > > Am wondering if it's possible to do a query that does something like this:- > > SELECT table1.*,table2.id from Table1 AS table1,Table2 AS table2 > WHERE table1.id DOESN'T EXIST IN table2.id; > > > Regards > > Marty > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]