how a reference cursor works?what all adnvantages are
gained with it..specify the situation?
Answer Posted / swapnareddy
Basically, Reference cursor is datatype.Reference cursor works
as a cursor variable.the advantage of using reference cursor
is it pass the result sets to the subprograms
(ie,procedures,packages and functions etc).
example for reference cursor usage:
type r_cursor is ref cursor;
c_emp r_cursor;
ename1 emp.ename%type;
begin
open c_emp is select ename from emp;
loop
fetch c_emp into ename1;
exit when c_emp% notfound;
dbms_output.put_line(ename1);
end loop;
close c_emp;
end;
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
Is record in oracle pl sql?
Is like operator in sql case sensitive?
How many rows can sqlite handle?
Is left join inner or outer by default?
What is the use of index in sql?
what is a composite primary key ? : Sql dba
What is information schema in sql?
What is a left inner join?
What is a temporal table?
Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?
What are different types of statements supported by sql?
What has stored procedures in sql?
What is lookup table in sql?
Define select, insert, create, delete, update, drop keywords
what is the difference between join and union? : Sql dba