we are trying to copy 2 columns from one table to another. we were trying to use update statement to achieve this task, but we are not able to find correct syntax.
table 1 table2
We would like to update table1 with values of colA & colB from table2 where key1 is equal to key2. Any help on this query is appericated.
Try this, I think it'll work:
set table1.colA=table2.colA, table1.colB=table2.colB where
Halo, it won't work.
The workable statement is:
UPDATE TABLE1 A SET (A.COL2, A.COL3) =
(SELECT B.COL2, B.COL3 FROM TABLE2 B WHERE A.KEY1=B.KEY2);
Click Here to Expand Forum to Full Width