How to update this?
Database
3
Posts
2
Posters
0
Views
1
Watching
-
Hi, I have 2 tables ,say A and B.
A: (ID Col1 Col2)
B: (ID Col3)ID-Unique Column.
I want to move col2 from A to B.
Hence I have added a new column in table B, say col4.I want an update statement that will transfer A.col2 to B.Col4.
Regards,
Arun Kumar.A -
Hi, I have 2 tables ,say A and B.
A: (ID Col1 Col2)
B: (ID Col3)ID-Unique Column.
I want to move col2 from A to B.
Hence I have added a new column in table B, say col4.I want an update statement that will transfer A.col2 to B.Col4.
Regards,
Arun Kumar.A -
Update B Set Col4 = A.COL2 FROM B Inner Join A on A.ID = B.ID
OrUPDATE B SET COL4 = (Select COL2 From A Where A.ID = B.ID)
Wout Louwers
It is working. Thank U very much.
Regards, Arun Kumar.A