Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how a reference cursor works?what all adnvantages are
gained with it..specify the situation?

Answers were Sorted based on User's Feedback



how a reference cursor works?what all adnvantages are gained with it..specify the situation?..

Answer / 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

how a reference cursor works?what all adnvantages are gained with it..specify the situation?..

Answer / narendrareddy

Generally, through static cursors we are using only one select statement at a time for single active set area. Whereas, in ref cursor we are executing number of select statements dynamically for single active set area. That’s why these types of cursors are called dynamic cursors.

1) Strong Ref Cursor: Having return type.
2) Weak Ref Cursor: Does not have return type.

Is This Answer Correct ?    2 Yes 0 No

how a reference cursor works?what all adnvantages are gained with it..specify the situation?..

Answer / rahul

1) It's a datatype.
2) variable created based on this is called cursor variable
3) advantage is their capability to pass result sets between
programs

Is This Answer Correct ?    2 Yes 1 No

how a reference cursor works?what all adnvantages are gained with it..specify the situation?..

Answer / a.jyothsna

Difference between cursor and ref-cursors is same as the
difference between variable and constant.
With ref-cursors we can use the cursors variable.

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More SQL PLSQL Interview Questions

Question: Below is the table city gender name delhi male a delhi female b mumbai male c mumbai female d delhi male e I want the o/p as follows: male female delhi 2 1 mumbai 1 1 Please help me in writing the query that can yield the o/p mentioned above?

2 Answers  


Why query optimization is needed?

0 Answers  


How to create your own reports in sql developer?

0 Answers  


What is a join?

0 Answers  


what is inline view?

15 Answers  


I i have 2 tables A & B ,A contains 10 records B contains 20 records ,what w'll be the o/p if we perform equijoin,outer join,right outer join,left outer join,full outer join,cross join seperately Can anyone help on this?

2 Answers  


Why sql query is slow?

0 Answers  


How to convert ms-excel file to oracle table?

2 Answers  


What are all the different normalizations?

0 Answers  


How do you know if a relationship is 2nf?

0 Answers  


Suppose I have to create a view on a table, that is not yet been created by DBA. I khow the table structure. Is it possible to create the view before DBA creates this table? If yes then how? Is it possible to create synonym in this way?

4 Answers   IBM, Metric Stream,


What is execute immediate?

0 Answers  


Categories