Toad World® Forums

Display RefCursor in Toad 13


Just like this question: Display results Stored procedure resturns SYS_REFCUR.

However, in Toad 12, it would bring up the results grid without any double-clicking on the word (CURSOR). And therefore, I could run the procedure with different parameters, and then go back and forth between the results. I THOUGHT that worked for me last week, after I’d upgraded to Toad 13. It doesn’t now. Now I get a free-floating box that has to be dismissed before I can get back to my Toad instance, after double-clicking on the word and waiting for my results.

Since it worked better in 12 (better than the answer to the linked question), that must still be there. I just can’t find it. How do I get the results grid directly, and in a pinned window within the application?


You can obtain your cursor in an anonymous block and assign it to a bind variable. When you execute Toad will prompt for the variable’s type/value. Set its type to Cursor and click OK. Results will show in the normal Data Grid.

Example function:

    cur   SYS_REFCURSOR;
    OPEN cur FOR SELECT * FROM user_tables;

    RETURN cur;

Example call…

    :cur := return_cur;

When prompted, set Type to cursor…


Results shown in the grid…



It took me a minute to remember what the change was and looking back at Toad 12 you are correct, cursors did show in their own grid by default when executing PL/SQL. In older Toad your only option for getting out/return values (excluding cursors) was to use DBMS output. The change was made to consolidate all output to a common area in a non-plain text format and support newer features like creation of unit tests from PL/SQL execution results.