MySQL Forums
Forum List  »  General

Re: SQL Select Issue
Posted by: Peter Brawley
Date: March 28, 2006 01:15PM

Check the version of the MySQL system. Pre-4.1 versions do not support subqueries. Try ...

SELECT field1
FROM table1 t1
LEFT JOIN table2 t2 USING (field1)
WHERE t2.field1 IS NULL;

which is logically equivalent and almost certainly much faster.

PB

Options: ReplyQuote


Subject
Written By
Posted
March 28, 2006 11:02AM
Re: SQL Select Issue
March 28, 2006 01:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.