February 9, 2011

REF CURSOR in PL/SQL

Cursor variable which will be assosiated with runtime queries with a result set value passing to the query.
declare


type emp_cur REF CURSOR;  /* Declare the ref cursor */
c_emp emp_cur ;  /*c_emp is the cursor variable */
v_variabe employees.ename%type;

begin
open c_emp for select ename from employees;
loop
fetch c_emp into en;
exit when c_emp%notfound;
dbms_output.put_line(en);
end loop;
close c_emp;
end

No comments:

Post a Comment

Thanks for your comments submitted.,will review and Post soon! by admin.

How I Identified 45 Configuration Gaps in an Oracle HCM Implementation — A Structured Approach

During a recent Oracle Fusion HCM implementation, I led a gap analysis that surfaced 45 configuration issues between the client's legacy...