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 |
|
johnnykenshien
Starting Member
2 Posts |
Posted - 2008-06-15 : 21:45:08
|
| Hello friends,Im a begginer in SQL Server and I just to ask for help on how to this this tablestable1 Field1 123 1234 12 154 123 321 123 21Table2Field1test1test2test3test4test5test6desired output Field1 Field1 123 test1 1234 test2 12 test3 154 test4 123 test5 321 test6 123 21can i ask for script how to join this table? i try this script but it doest work.select table1.col1,table2.col1from table1left join table2ON table1.col1 is NOT NULLThanks in advance and more power! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-16 : 00:12:17
|
Dont you have a column by which the two tables are related? If that column is col2 you can write:-SELECT t1.field1,t2.field1FROM Table1 t1LEFT JOIN Table2 t2ON t1.col2=t2.col2 |
 |
|
|
shobinmathew
Starting Member
16 Posts |
Posted - 2008-06-16 : 07:17:36
|
| is ther any primary key - foreign key relation ship |
 |
|
|
|
|
|