Sample Header Ad - 728x90

Best practice between using LEFT JOIN or NOT EXISTS

129 votes
5 answers
349365 views
Is there a best practice between using a LEFT JOIN or a NOT EXISTS format? What is benefit to using one over the other? If none, which should be preferred? SELECT * FROM tableA A LEFT JOIN tableB B ON A.idx = B.idx WHERE B.idx IS NULL ---------- SELECT * FROM tableA A WHERE NOT EXISTS (SELECT idx FROM tableB B WHERE B.idx = A.idx) I am using queries within Access against a SQL Server database.
Asked by Michael Richardson (1465 rep)
Nov 13, 2015, 07:18 PM
Last activity: Aug 8, 2023, 05:37 AM