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 are sql indexes?

0 Answers  


Is oracle and sql same?

0 Answers  


How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?

0 Answers  


what is query cache in mysql? : Sql dba

0 Answers  


Like shown below i have 3 columns(Name,No,Address). The values in name column i want to modity. Requirement : Keep only once space between two words (Fname,Lname) in the Name column. For this what is the query? Please answer me. Advance Thanks. Name No Address Reference manoj kumar kumar raja vinzay kumar rajendra prasad gowri nath -- -- --

5 Answers  






What is the maximum database size for sql express?

0 Answers  


What is crud stand for?

0 Answers  


display records from 5 to 9 using rowid or rownum

5 Answers   Agile Software,


how to connect oracle in unix prompt?

4 Answers   Polaris,


Can 2 queries be executed simultaneously in a distributed database system?

0 Answers  


What is sql not null constraint?

0 Answers  


can i write pl/sql code in a package

2 Answers  


Categories