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;
循环更新数据库 脚本
最新推荐文章于 2023-09-13 10:49:13 发布
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;