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 |
|
mavershang
Posting Yak Master
111 Posts |
Posted - 2009-04-20 : 15:17:13
|
| Hi all. This forum has helped me out of a bunch of rookie's question. Here is another one.I have two tables with the same columns.table a:pos1 content1 s2 g4 t...table b:pos1 content1 tt3 c4 t...now I want to have a table with the corresponding relation between a and b likea.pos1 a.content b.pos1 b.content1 s 1 tt2 g null nullnull null 3 c4 t 4 t I tried a simple Left Outer Join but only get part of the table I want. Any suggestion? Thanks |
|
|
jdaman
Constraint Violating Yak Guru
354 Posts |
Posted - 2009-04-20 : 15:30:47
|
Try using a full join like so:select *from afull join b on a.pos1 = b.pos1 |
 |
|
|
mavershang
Posting Yak Master
111 Posts |
Posted - 2009-04-20 : 15:40:02
|
Thanks a lot. quote: Originally posted by jdaman Try using a full join like so:select *from afull join b on a.pos1 = b.pos1
|
 |
|
|
|
|
|