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

What is dml statement?

0 Answers  


Can you sum a count in sql?

0 Answers  


What is record variable?

0 Answers  


How do you drop a trigger?

0 Answers  


What do you understand by pl/sql records?

0 Answers  


What is the difference between function, procedure and package in pl/sql?

0 Answers  


Can a foreign key have a different name?

0 Answers  


How do we tune the code?

2 Answers  


what is 'mysqlcheck'? : Sql dba

0 Answers  


what is blob? : Sql dba

0 Answers  


How to get help at the sql prompt?

0 Answers  


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

3 Answers  


Categories