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 |
|
vicki
Posting Yak Master
117 Posts |
Posted - 2002-04-12 : 11:00:04
|
| Hi,Is there any way to insert the column? For example:Table1: 6 columnsTable 2: 4 columnsFirst2 columns from table 2 are same as table1, and now all I want just either insert/update last two columns from table 2 into table 1How can I do it?thanks |
|
|
Peter Dutch
Posting Yak Master
127 Posts |
Posted - 2002-04-12 : 11:18:11
|
| UPDATE Table1SET t1.Column5 = t2.Column3, t1.Column6 = t2.Column4FROM Table1 t1 INNER JOIN Table2 t2 ON t1.Column1 = t2.Column1This of course assumes (as I read from your post) that both tables can be joined on the first columns. |
 |
|
|
|
|
|