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!

Check for empty REF CURSOR in PL/SQL

446249Oct 16 2006 — edited Oct 16 2006
Hi. From a web page, I'm calling a PL/SQL stored procedure that opens a SYS_REFCURSOR. Is there a way to test the cursor to see if it has any rows? Your help is much appreciated,

procedure p_get_classes(prm_id in number, prm_crs out sys_refcursor) is
begin
open prm_crs for
select s.full_name, s.course_name
from classes s
where s.id = prm_id
order by s.course_name;
/* can a test be performed on the cursor here to see if it's empty? */
end p_get_classes;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2006
Added on Oct 16 2006
4 comments
13,266 views