欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

记一个有用的存储过程 CC++C# 

程序员文章站 2022-05-29 12:48:05
...
CREATE OR REPLACE PROCEDURE "SP_TEMP_TEST"  as
  a_id integer;
  cursor cur_a is select c.id from tab_content c where c.type='ARTICLE' order by c.createtime;
begin
    open cur_a;
    fetch cur_a into a_id;
    while cur_a%found loop
  update tab_content c set c.sequence = temp_sequence.nextval where c.id=a_id;
      fetch cur_a into a_id;
    end loop;
    close cur_a;
    commit;
end;
相关标签: C C++ C#