what is the difference between cursor FETCH and FOR LOOP ?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / paras jain
in fetch exit condition is must in for loop no need.
Is This Answer Correct ? | 4 Yes | 0 No |
How do I debug a stored procedure?
Types of joins?
Explain what is a column in a table?
What are the different types of triggers?
how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba
what is 'mysqladmin' in mysql? : Sql dba
What is varchar data type in sql?
what is the difference between truncate and drop statements? : Sql dba
How to run sql commands in sql*plus?
Is big data nosql?
What is dcl in sql?
What's the difference between a primary key and a clustered index?