Can an Oracle SQL procedure return a table? I\'m currently using a dbms_output to print out the outputs of two cursors which are in a loop, although this would
dbms_output
I think that you can use Oracle Cursor for this (if your Oracle version supports it):
PROCEDURE myprocedure( mycursor OUT SYS_REFCURSOR ) AS BEGIN OPEN mycursor FOR SELECT * FROM mytable; END; END;