17,382
社区成员




merge into table2 using table1 on (table2.id=table1.id)
when matched then update set table2.name=table1.name;
update table2 set name=(select name from table1 t where t.id=table2.id) where exists(select 1 from table1 z where z.id=table2.id);
update table2 t2
SET t2.NAME=(SELECT t1.NAME FROM table1 t1
WHERE t1.ID=t2.ID)
WHERE EXISTS (SELECT NULL
FROM table1 t3
WHERE t3.ID=t2.ID);
update table1 t1,table2 t2 set t2.NAME = t1.NAME
where t1.ID=t2.ID