what is the difference between cursor FETCH and FOR LOOP ?

Answers were Sorted based on User's Feedback



what is the difference between cursor FETCH and FOR LOOP ?..

Answer / meher

The main difference between cursor FETCH and FOR LOOP is as
below :
In case of cursor FETCH the cursor will open atleast once
but in case of cursor FOR LOOP the cursor will may or
maynot be open.

Is This Answer Correct ?    31 Yes 8 No

what is the difference between cursor FETCH and FOR LOOP ?..

Answer / kiran kumar

The cursor FOR LOOP implicitly declare loop index as a
record of %ROWTYPE open a cursor implicity and repeatedly
fetch the records from the active set into the field of
record, then close the cursor implictly all rows have been
processed.
In case of cursor FETCH explicity open a cursor, fetch the
records and close the cursor.

Is This Answer Correct ?    26 Yes 3 No

what is the difference between cursor FETCH and FOR LOOP ?..

Answer / paras jain

in fetch exit condition is must in for loop no need.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

can i write pl/sql code in a package

2 Answers  


What can I use instead of union in sql?

0 Answers  


How to add Foreign key in a table after the creation of the table?

5 Answers   Satyam,


What is trigger in pl sql with examples?

0 Answers  


Why we use cross join?

0 Answers  






how can I make a script that can be bi-language (supports english, german)? : Sql dba

0 Answers  


What is use of term?

0 Answers  


What is minus?

0 Answers  


What are the string functions in sql?

0 Answers  


When you have to use a default "rollback to" savepoint of plvlog?

0 Answers  


Source is Sales Table: Sno Prod Sales Sales_Amount 1 A 10 2000 2 A 20 1000 3 C 10 3000 4 D 30 4000 5 A 20 1000 Target : Sales_Count T_Sales_Amt Sales_Count(A) T_Sales_Amt(A) 90 11000 50 4000 In single query, pls tell me.

5 Answers   CGI,


Why commit is not used in triggers?

0 Answers  


Categories