存储过程和游标的应用
create or replace procedure test(a in number)
is
b number;
cursor cur(c number) is select * from (select 1 key from dual union select 2 key from dual) t where t.key=c ;
begin
open cur(a);
fetch cur into b;
dbms_output.put_line('======'||b);
close cur;
end;
call test(1);