I have table1 (col1,col2) and table2(col1,col2) as given below/
Now i need to replace values of col2 of table1 with corresponding value of col1 and col2 from table2. So that the final table should look like this. how can we do this in query??
I assume table1.col2 and table2.col2 have the same text type(?)
update table1 set table1.col2=table2.col2
from table1
join table2 on (table1.col2=table2.col1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With