Dan, SELECT ResourceTable.* FROM ResourceTable LEFT JOIN ResourceLinkTable ON ResourceTable.ResourceID = ResourceLinkTable.ResourceID WHERE ResourceLinkTable.ResourceID IS NULL;
Regards, Thomas On Thu, 30 Oct 2003, Dan Lamb wrote: > Hello All, > > I have two table the look like this (greatly simplified): > > ResourceTable > ------------- > int ResourceID > var ResourceName > > ResourceLinkTable > ----------------- > int ResourceLinkID > int ResourceID > var Text > > I need to find all rows in ResourceTable for which there is NO entry in > ResourceLinkTable. I know I could do this with sub-selects like this: > > Select * from ResourceTable where ResourceID not in (select distinct > ResourceID from ResourceLinkTable) > > How can I do this in MySQL 4.0 without using sub-selects? > > Thanks, > Dan Lamb > > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]