DECLARE
TYPE REFCUR_EMP_TYPE IS REF CURSOR RETURN emp%ROWTYPE;
rcur_emp REFCUR_EMP_TYPE;
PROCEDURE process_emp_cur(rcur_emp IN REFCUR_EMP_TYPE) IS
l_emp emp%ROWTYPE;
BEGIN
dbms_output.put_line('Emp table details');
loop
fetch rcur_emp into l_emp;
exit when rcur_emp%notfound;
dbms_output.put_line('Empno : '|| l_emp.empno);
dbms_output.put_line('Ename : '|| l_emp.ename);
End loop;
END;
BEGIN
OPEN rcur_emp FOR select * from emp where rownum < 2;
process_emp_cur (rcur_emp);
CLOSE rcur_emp;
END;
Subscribe to:
Post Comments (Atom)
External Table
Oracle External Table External tables are defined as tables that do not resides in the database allows you to access data that is stor...
-
Table clustering is an optional technique of storing data. In table clustering, rows from one or more tables those are associated with ea...
-
Oracle PL/SQL block accepts user input information with the help of substitution variable. Substitute variable can not be used to output va...
-
Finally continue statement added to oracle 11g PL/SQL language. It signals an immediate end to a loop iteration and return to first statemen...
No comments:
Post a Comment