declare i number(4);
begin
i:=1;
while( i<100)
loop
update pms_node n set n.brandcount=(select count(*) from pms_brand b where b.nodeid=i) where n.id=i;
i:=i+1;
end loop;
end;
循环更新数据库 脚本
最新推荐文章于 2024-04-24 15:44:04 发布
declare i number(4);
begin
i:=1;
while( i<100)
loop
update pms_node n set n.brandcount=(select count(*) from pms_brand b where b.nodeid=i) where n.id=i;
i:=i+1;
end loop;
end;