Oracle update的相关有关问题

Oracle update的相关问题
各位大大们,我是菜鸟,最近做数据整理的时候遇到问题求解决。
我有2张表(table1)和(table2),table1中有2个关键字段(col1和col2)table2中也有2个关键字段(col3和col4),我需要做的就是判断col1=col3,如果相等,就把col4的值赋给col2,曾经尝试用merge,但由于col1字段是不唯一的,所以报错了。求大神指导。
------解决方案--------------------
update table1
set col2=(select col4 from table2 where col3=table1.col1)
where exists(select 1 from table2 where col3=table1.col1)

或者,如果table2上的col3字段有唯一约束,可以
update(select t1.col2,t2.col4 from table1 t1,table2 t2 where t1.col1=t2.col3)
set col2=col4