Oracle 数据 使用游标
程序员文章站
2023-12-06 13:03:22
复制代码 代码如下:create or replace procedure proceudre_name as begin declare spara varchar(50...
复制代码 代码如下:
create or replace
procedure proceudre_name as
begin
declare
spara varchar(50);
spara2 varchar(50);
cursor c_cursor is select id,name from temp_table;
begin
open c_cursor;
loop
fetch c_cursor into spara, spara2;
exit when c_cursor%notfound;
begin
--just do what you want.
end;
end loop;
close c_cursor;
end;
end;