GeekInterview.com
Series: Subject:
Question: 130 of 196

Hi

How do I call procedures which have ref cursors as parameters and print the elements in the ref cursor in PL/SQL Developer ?

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 ?

Asked by: Interview Candidate | Asked on: Nov 23rd, 2006

This Question is not yet answered!

Related Open Questions

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.