SQL> CREATE OR REPLACE PACKAGE ref_test AS 2 TYPE RefTyp IS REF CURSOR RETURN sys.dual%ROWTYPE; 3 PROCEDURE ref_proc (p_ref IN OUT RefTyp); 4 END ref_test; 5 / Package created. SQL> CREATE OR REPLACE PACKAGE BODY ref_test AS 2 PROCEDURE ref_proc (p_ref IN OUT RefTyp) IS 3 BEGIN 4 OPEN p_ref FOR SELECT * FROM dual; 5 END ref_proc; 6 END ref_test; 7 / Package body created. SQL> var v_rfcur REFCURSOR; SQL> exec ref_test.ref_proc(:v_rfcur); PL/SQL procedure successfully completed. SQL> print v_rfcur D - X =0D -----Original Message----- From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of hamid alavi Sent: Tuesday, May 31, 2005 5:31 AM To: Oracle-L Subject: ref cursor I have a store procedure which have a ref cursor as input & Output I wonder how can I execute it & test this store procedure & see the results. Thanks, -- //www.freelists.org/webpage/oracle-l Bu mesaj ve onunla iletilen tum ekler gonderildigi kisi ya da kuruma ozel= ve Bankalar Kanunu geregince, gizlilik yukumlulugu tasiyor olabilir. Bu= mesaj, hicbir sekilde, herhangi bir amac icin cogaltilamaz, yayinlanamaz= ve para karsiligi satilamaz; mesajin yetkili alicisi veya alicisina= iletmekten sorumlu kisi degilseniz, mesaj icerigini ya da eklerini= kopyalamayiniz, yayinlamayiniz, baska kisilere yonlendirmeyiniz ve mesaji= gonderen kisiyi derhal uyararak bu mesaji siliniz. Bu mesajin iceriginde= ya da eklerinde yer alan bilgilerin dogrulugu, butunlugu ve guncelligi= Bankamiz tarafindan garanti edilmemektedir ve bilinen viruslere karsi= kontrolleri yapilmis olarak yollanan mesajin sisteminizde yaratabilecegi= zararlardan Bankamiz sorumlu tutulamaz. This message and the files attached to it are under the privacy liability= in accordance with the Banking Law and confidential to the use of the= individual or entity to whom they are addressed. This message cannot be= copied, disclosed or sold monetary consideration for any purpose. If you= are not the intended recipient of this message, you should not copy,= distribute, disclose or forward the information that exists in the content= and in the attachments of this message; please notify the sender= immediately and delete all copies of this message. Our Bank does not= warrant the accuracy, integrity and currency of the information= transmitted with this message. This message has been detected for all= known computer viruses thence our Bank is not liable for the occurrence of= any system corruption caused by this message -- //www.freelists.org/webpage/oracle-l