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...

what is ref cursor in pl/sql?

Answer Posted / hitendra yadav

Reference cursor is as like pointer in C ad PASCAL language
which is point the data's memory location,REF CURSOR is
dynamic cursor which can be open for more then one query.
there are two type of ref cursof:-
(1) WEEK REF CURSOR:- ref cursor which not have return
cluse in defination.
(2) STRONG REF CURSOR :- ref cursor which use return cluse
in defination.

for example:-

SET serveroutput ON
DECLAR
TYPE eref REF CURSOR; -- WEEK REF CURSOR
eref1 eref;
erec employees%ROWTYPE;
BEGIN
OPEN eref1 FOR SELECT *
FROM employees
WHERE dept_id=90;
LOOP
FETCH eref1
INTO erec;
DBMS_OUTPUT.PUT_LINE(erec.emp_id);
EXIT WHEN eref1%NOTFOUND;
END LOOP;
END;

Is This Answer Correct ?    30 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is coalesce faster than isnull?

960


What is procedure in pl sql?

1031


Why do we need cursor in pl sql?

1125


Is there a way to automate sql execution from the command-line, batch job or shell script?

962


what is isam? : Sql dba

994


What is the basic structure of an sql?

1091


what is self-join? : Sql dba

1142


what are null values? : Sql dba

946


What is mutating error in pl sql?

1010


What is audit logout in sql profiler?

1013


Can you select everything, but 1 or 2 fields, without writer's cramp?

976


how to enter numeric values as hex numbers? : Sql dba

1055


What does trigger mean in psychology?

958


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

1258


Explain the structure of pl/sql in brief.

1075