declare cursor admin_cur is select admininfo_id,admininfo_name from admininfo;
begin
for my_cur in admin_cur loop
update project set admininfo_id=my_cur.admininfo_id where PROJECT_RESPONSIBILITY=my_cur.admininfo_name;
end loop;
end;
原文地址:http://www.cnblogs.com/q446223455/p/3833189.html