I don't think such a function exists, because Oracle's language specification doesn't allow for cursor
objects to be passed as parameters. Unless Oracle has used some magic somewhere, there's just no way to generically reference a cursor
without using a refcursor
.
However, you don't need to embed your SQL in a string to use a sys_refcursor
. Here's a very simple example showing that a sys_refcursor
can be opened using static SQL:
DECLARE
c SYS_REFCURSOR;
BEGIN
OPEN c FOR SELECT * FROM DUAL;
CLOSE c;
END;