Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to call stored procedure using ref cursor in PL/SQL Developer Version 6

547523Nov 22 2006 — edited Nov 23 2006
Hi
I executed the following code in PL/SQL Developer :

CREATE OR REPLACE PACKAGE EMP_PACK AS
TYPE EMPCURTYP IS REF CURSOR RETURN EMP%ROWTYPE;
PROCEDURE EMP_PROC( EMP_CUR IN OUT EMPCURTYP);
END EMP_PACK;


CREATE OR REPLACE PACKAGE BODY EMP_PACK AS
PROCEDURE EMP_PROC(EMP_CUR IN OUT EMPCURTYP) IS
BEGIN
OPEN EMP_CUR FOR SELECT * FROM EMP;
END EMP_PROC;
END EMP_PACK;
/

When I executed the following command , I got the following statement

SQL> variable var refcursor;
REFCURSOR not supported

The same statement is working in SQL*Plus environment

How is it to be executed in PL/SQL Developer ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 21 2006
Added on Nov 22 2006
6 comments
2,568 views