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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 left join
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Constraint Violating Yak Guru

420 Posts

Posted - 02/18/2014 :  21:51:12  Show Profile  Reply with Quote
tableA has ID 12345 and 54321, houseID 88888 and 99999
tableB has ID 12345 and 54321, houseIS 88888

how can i select * from tableA

i tried this but it only appear those which match

select * from tableA left join tableB where tableA.ID=tableB.ID and tableA.houseID=tableB.houseID

Almighty SQL Goddess

38200 Posts

Posted - 02/19/2014 :  00:23:02  Show Profile  Visit tkizer's Homepage  Reply with Quote
Your query is correct. If you aren't getting the correct results, please post better sample data.

Tara Kizer
SQL Server MVP since 2007
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000