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 |
What is dml statement?
Can you sum a count in sql?
What is record variable?
How do you drop a trigger?
What do you understand by pl/sql records?
What is the difference between function, procedure and package in pl/sql?
Can a foreign key have a different name?
How do we tune the code?
what is 'mysqlcheck'? : Sql dba
what is blob? : Sql dba
How to get help at the sql prompt?
how can we replace the particular column value of a resulted set of executed query? I mean write down a sql query to chane the particular column's value of a resulted set of executed query