Skip to content

Instantly share code, notes, and snippets.

@kllaudyo
Created July 30, 2019 13:43
Show Gist options
  • Save kllaudyo/eaee233c0134a8feea323fef2ec69b66 to your computer and use it in GitHub Desktop.
Save kllaudyo/eaee233c0134a8feea323fef2ec69b66 to your computer and use it in GitHub Desktop.
declare
rs sys_refcursor;
type result is record(
status char(1),
message varchar2(250)
);
x result;
begin
procedure_returns_sys_ref_cursor(rs_out_parameter, others_parameters);
if rs_out_parameter is not null then
loop
fetch rs_out_parameter into x;
exit when rs_out_parameter%notfound;
dbms_output.put_line(x.status || ' - ' || x.message);
end loop;
close rs_out_parameter;
end if;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment