Re: Return list where no data exists

2006-08-22 Thread Chris
Neil Tompkins wrote: Using this query seems to hang my computer and mySQL server reported the queries had been LOCKED. How many records are in each table? It could take a while, especially if you don't have indexes on the join fields. -- MySQL General Mailing List For list archives: http:/

RE: Return list where no data exists

2006-08-21 Thread Neil Tompkins
Using this query seems to hang my computer and mySQL server reported the queries had been LOCKED. > Date: Mon, 21 Aug 2006 11:09:35 +0200> From: [EMAIL PROTECTED]> To: [EMAIL > PROTECTED]> CC: mysql@lists.mysql.com> Subject: Re: Return list where no data > exists> >

Re: Return list where no data exists

2006-08-21 Thread Johan Höök
Hi Neil, what you need is a LEFT JOIN: SELECT a.* FROM TableA a LEFT JOIN TableB b ON a.ID = b.ID (assuming ID is what you relate the tables on ) WHERE b.ID IS NULL; should hopefully do what you want. /Johan Neil Tompkins skrev: Hi, I've two tables. What q