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
What are keys in sql?
What is a table?
a table has 2 classifications 1)liabilities 2)earnings this liabitity has 2 elements with 2 input values and the earnings have 2 elements with 2 input values i wrote a query so that my input is liability savings amount1 amount2 xxxx null xxxxxx 0 xxx1 null xxxxx1 0 null yyyy 0 yyyy null yyy1 0 yyy1 my problem is --when i developed a report(d2k) with this data my o/p is liabilities,amount1,savings,amount2 xxxx xxxxxx xxx1 xxxxx1 yyyy yyyy yyy1 yyy1 how could i move this savings,savings values 2 palces up. can any body provide me witha better solution
How do I turn a list into a table?
What is the use of pl/sql table?
define data blocks ? : Sql dba
how to check server status with 'mysqladmin'? : Sql dba
what is a trigger? : Sql dba
Does truncate require commit?
What are the benefits of pl/sql packages?
How do you exit in sql?
What are local and global variables and their differences?
What does (*) mean in sql?
What is the difference between left and left outer join?
what is sub-query? : Transact sql