Im joining two tables and I want to then join a third but I want to get the result of the records that dont join. Dont really know what to use to do this. Can I search for nulls that appear outside the join or something?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The best-performing way to do this in general is to use
NOT INorNOT EXISTS– they are identical behind the scenes in SQL Server 2005+.They are preferred over
LEFT JOIN...IS NULLbecause they short circuit – as soon as the matching condition is found, that record is skipped.LEFT JOINloads the whole data set and relation, then eliminates records afterwards.or