HomeНаука и техникаRelated VideosMore From: Subhroneel Ganguly

Return sys_refcursor through function in PL/SQL

5 ratings | 2835 views
How to return a set of Table row data through function using sys_refcursor in PL/SQL A simple tutorial to demonstrate using ref cursor in pl sql function opening and return ref cursor.
Html code for embedding videos on your blog
Text Comments (8)
Abhaya Kumar Behera (3 years ago)
Do u have any other contacts like skype,gmail etc...
Abhaya Kumar Behera (3 years ago)
Thank you very much. I'll connect you soon
Subhroneel Ganguly (3 years ago)
email [email protected], skype subhroneel_76, facebook : https://www.facebook.com/subhro1976
Abhaya Kumar Behera (3 years ago)
Hi Subihroneei Can you please tell how we can return the same using a procedure? Here you explained by using function But I need a procedure that will return multiple value by the sys-Refcursor.
Subhroneel Ganguly (3 years ago)
Sure.. any time.
Abhaya Kumar Behera (3 years ago)
Hey Thanks Really its awesome. Can I have ask some more doubts to you?
Subhroneel Ganguly (3 years ago)
+Abhaya Kumar Behera Yes you can do such. Just add sys_refcursor as out parameter in your procedure and ope the cursor in you procedure body. thats all. i.e create or replace procedure getEmployee(rec_cur out sys_refcursor) isbeginopen rec_cur for select * frrom employee;end;declarerec sys_refcursor;emp employee%rowtype;begingetEmployee(rec);loopfetch rec into emp;exit when rec%notfound;end loop;close rec;end;
Subhroneel Ganguly (4 years ago)

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.