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.
| Author |
Topic |
|
padrone
Starting Member
2 Posts |
Posted - 2011-06-03 : 17:02:10
|
hilet's assume we have two tables (t1,t2) like below how we can retrieve table t3 in a query?sorry for my bad Englishthanks 4 your help! |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-06-03 : 17:59:48
|
| [code]select isnull(t1.id,t2.id) as ID, t1.sum1, t2.sum2from t1 full join t2 on t1.id = t2.id[/code]It is the full outer join that lets you get data from one table even when there is no matching data in the other table. |
 |
|
|
padrone
Starting Member
2 Posts |
Posted - 2011-06-03 : 18:27:02
|
| workedthanks dude |
 |
|
|
|
|
|