If I use out sys_refcursor parameter, I'm struggling with if the first cursor has any results.
create or replace procedure cursorresults
as
(cursor1 OUT sys_refcursor
cursor2 OUT sys_Refcursor)
begin
open cursor1 for
select * from table1;
**if cursor1 has any results**
open cursor2 for
select * from table2;
end;
I can requery the table1 to see if there was a match but there must be a better way?