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

How do I debug a stored procedure?

0 Answers  


Types of joins?

4 Answers   Microsoft,


Explain what is a column in a table?

0 Answers  


What are the different types of triggers?

0 Answers  


how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

0 Answers  






what is 'mysqladmin' in mysql? : Sql dba

0 Answers  


What is varchar data type in sql?

0 Answers  


what is the difference between truncate and drop statements? : Sql dba

0 Answers  


How to run sql commands in sql*plus?

0 Answers  


Is big data nosql?

0 Answers  


What is dcl in sql?

0 Answers  


What's the difference between a primary key and a clustered index?

0 Answers  


Categories