17,086
社区成员
发帖
与我相关
我的任务
分享
procedure init_temp_table
(
p_cursor out cursor;
)
as
cursor st_cursor is
select * from st_table;
begin
for cur in st_cursor loop
if (check_st_cursor_status(cur.stid)) then
insert into t_temp (COL) values (cur.stid);
commit;
end if;
end loop;
open p_cursor for select * from t_temp ;
EXCEPTION
when others THEN
dbms_output.put_line(Sqlerrm);
rollback;
end init_temp_table;