得用rowid更新表内容

begin
for cc in ( select t.yskid , t.xuh, row_number() OVER(PARTITION BY t.yskid order by t.yssjid ) as row_flg ,rowid from yuansbxsj t ) loop

update yuansbxsj xx set xx.xuh = cc.row_flg where xx.rowid = cc.rowid;

end loop ;

end;

posted @ 2021-04-25 16:43  绿水青山777  阅读(98)  评论(0编辑  收藏  举报