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 |
|
mr_dayal
Starting Member
37 Posts |
Posted - 2008-07-03 : 03:34:08
|
| I have two tables Table1Id Code_____________________ ________ JC/HL/SIL/S2/STOL0007 STOL0007 JC/HL/COT/P2/PLAI0008 PLAI0008JC/HL/COT/P2/RANG0002 RANG0002JC/HL/COT/B2/PLAI0001 PLAI0001 JC/HC/C/B4/BAND0001 BAND0001 JC/HL/COT/B2/DESI0001 DESI0001 and table2Id Code_____________________ ________ JC/HL/SIL/S2/STOL0007 JC/HL/COT/P2/PLAI0008 JC/HL/COT/P2/RANG0002 JC/HL/COT/B2/PLAI0001 JC/HC/C/B4/BAND0001 JC/HL/COT/B2/DESI0001 Now I want to update code field of table2 with the same data as in code column of table1.. How Will i do that?Mr Dayal |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2008-07-03 : 03:37:14
|
| update table2set code = t1.codefrom table1 t1inner join table2 t2on t1.id = t2.id |
 |
|
|
|
|
|