If you are on Oracle 12c with a 12c client, this should work:
declare
rc sys_refcursor;
begin
open rc for 'select * from dual';
dbms_sql.return_result(rc);
end;
More Related Contents:
- What is the replacement of cursor foreach in oracle pl/sql?
- Can you SELECT everything, but 1 or 2 fields, without writer’s cramp?
- Printing the value of a variable in SQL Developer
- PL/SQL, how to escape single quote in a string?
- Oracle PL/SQL – Raise User-Defined Exception With Custom SQLERRM
- Passing an array of data as an input parameter to an Oracle procedure
- Convert comma separated string to array in PL/SQL
- UTL_FILE.FOPEN() procedure not accepting path for directory?
- Oracle stored procedure with parameters for IN clause
- PL/SQL ORA-01422: exact fetch returns more than requested number of rows
- Get resultset from oracle stored procedure
- ways to avoid global temp tables in oracle
- Split function in oracle to comma separated values with automatic sequence
- check if “it’s a number” function in Oracle
- ORA-06508: PL/SQL: could not find program unit being called
- How to return a resultset / cursor from a Oracle PL/SQL anonymous block that executes Dynamic SQL?
- Create Pivot view in SQL from a SQL table
- SQL*Plus how to accept text variable from prompt?
- Why doesn’t PL/SQL respect privileges granted by Roles?
- if (select count(column) from table) > 0 then
- Can We use threading in PL/SQL?
- Why cannot I use bind variables in DDL/SCL statements in dynamic SQL?
- What is the algorithm used by the ORA_HASH function?
- passing in table name as plsql parameter
- Reading clob line by line with pl\sql
- How to use parameters in a ‘where value in…’ clause?
- Why cannot I create triggers on objects owned by SYS?
- No more data to read from socket
- automating rollback script oracle
- How do I get column datatype in Oracle with PL-SQL with low privileges?