BEGINFOR c IN (select distinct t2.name,t1.idfrom table1 t1,table2 t2where t1.id = t2.id)LOOPupdate table1 set name = c.name where id = c.id;END LOOP;END;
BEGIN FOR c IN ( select distinct t2.name,t1.id from table1 t1, table2 t2 where t1.id = t2.id ) LOOP update table1 set name = c.name where id = c.id; END LOOP; END;
查看更多关于不使用游标,多张表的多条记录更新的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did96189