Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 check my left join?

Author  Topic 

knudmt
Starting Member

12 Posts

Posted - 2012-09-07 : 17:46:50
2 tables
[Left table]
name, title

[Right table]
name, title

I want all the values from the Left table where there is NOT a match in the right.

would this be correct?
SELECT name, title
FROM leftTable
LEFT OUTER JOIN rightTable
ON leftTable.name == rightTable.name AND leftTable.title == rightTable.title
WHERE leftTable.name == null AND leftTable.title == null;

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-09-07 : 17:48:44
Duplicate: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=178590

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -