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

Types of cursors?

Answer Posted / saleem

1) Implicit: declared for all DML and pl/sql statements.
By default it selects one row only.
2) Explicit: Declared and named by the programmer.
Use explicit cursor to
individually process each row returned by a
Multiple
statements, is called ACTIVE SET.
Allows the programmer to
manually control explicit cursor in the
Pl/sql block
a) declare: create a named sql area
b) Open: identify the active set.
c) Fetch: load the current row in to variables.
d) Close: release the active set.

CURSOR ATTRIBUTES
a) %is open: evaluates to true if the cursor is open.
b) %not found: evaluates to true if the most recent fetch
does not return a row
c) %found: evaluates to true if the most recent fetch
returns a row.
d) %row count: evaluates to the total number of rows
returned to far.

Example for cursor:
1) Declare
Vno emp.empno%type;
Vname emp.ename %type;
Cursor emp_cursor is
Select empno,ename
From emp;
Begin
Open cursor;
For I in 1..10 loop
Fetch emp_cursor into vno,vname;
Dbms_output.putline(to_char(vno) ||? ?||vname);
End if;
E nd;

2) Begin
Open emp_cursor;
Loop
Fetch when emp_cursor % rowcount >10 or

Emp_curor % not found;
Bdms_output_put_line(to_char(vno)||? ?||
vname);
End loop;
Close emp_cursor;
End;

CURSOR FOR LOOP
A) cursor for loop is a short cut to process explicit cursors
B) it has higher performance
C) cursor for loop requires only the declaration of the
cursor, remaining things like opening, fetching and close
are automatically take by the cursor for loop

Example:
1) Declare
Cursor emp_cursor is
Select empno,ename
From emp;
Begin
For emp_record in emp_cursor loop
Dbms_output.putline(emp_record.empno);
Dbms_output.putline(emp_record.ename)
End loop
End;

Is This Answer Correct ?    33 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List of all the modules under Manufacturing, Finance and Distribution in oracle applications?

2168


WHAT IS CUSTOM VIEW AND CUSTOM COMPONENT?

3005


Can u give the Documentation of Custom.pll in oracle apps

3419


what is the differences between internal requisition and internal sales order?

2603


Explain oracle apps architecture.

1191


What is a flexfield? List out its types.

1109


Which oracle apps version you are very confident in?

1175


What does appl_top directory contain?

1078


Are you familiar with internet architecture of oracle apps 11i?

1015


Can you differentiate between mediator and osb?

1091


please any one provide the oracle erp technical interview questions on modules(PO,AP,AR,INV,GL,OM)wise to my mail id..narendra_609@yahoo.co.in

3573


Do you know what is applysys in oracle application database schema, what is apps?

1135


Tell me how to find the custom directory in front end?

1053


What are the different components of soa suite?

1145


pls send me out bound code of supplers,site,bankiformation code pls as soon as

2211