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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Left And Right Join

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2010-06-29 : 02:35:53
i have 2 Tables

A B
1 1
2 2
3 4

i want to get all the rows

A B
1 1
2 2
3 NULL
NULL 4


vaibhavktiwari83
Aged Yak Warrior

843 Posts

Posted - 2010-06-29 : 03:01:43
SELECT * FROM Table1 FULL OUTER JOIN Table2 ON Table1.A = Table2.B

Vaibhav T

To walk FAST walk ALONE
To walk FAR walk TOGETHER
Go to Top of Page
   

- Advertisement -