We need to update values in table1 with data from table2 where common_column is the present in both tables and data should be updated based on this :
update table1 tl set table1_column=(select v.table2_column from table2 v where v.common_column= tl.common_column) where tl.table2_column is not null; -- here condition can be any other condition
update table1 tl set table1_column=(select v.table2_column from table2 v where v.common_column= tl.common_column) where tl.table2_column is not null; -- here condition can be any other condition
No comments:
Post a Comment