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 |
prettymom
Starting Member
1 Post |
Posted - 2011-06-08 : 01:33:21
|
Hi,Please help me building my script.I need to replace all the data in the columns of table A,that has same primary key to table B.example:Table Acolumn = pn stock1 a 1Table Bcolumn = pn stock1 a 2I need to make the data of table B replace the data of table A if they have the same PN.Thanks,Rexa |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-06-08 : 08:00:20
|
[code]UPDATE A SET col1 = B.col1FROM TableA A INNER JOIN TableB B on A.PN = B.PN[/code] |
|
|
|
|
|