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 to analyze tables with 'mysqlcheck'? : Sql dba

0 Answers  


Which normal form is best?

0 Answers  


What are different functions in sql?

0 Answers  


What are basic techniques of indexing?

0 Answers  


Can a varchar be a primary key?

0 Answers  


How can I see all tables in sql?

0 Answers  


How to remove duplicate rows from a table?.

3 Answers  


What pl/sql package consists of?

0 Answers  


What does plv msg allows you to do?

0 Answers  


i have a table emp and columns ename,empno,mgr_id,i need ename,manager name as result i.e employee respective manager.. example empno ename mgr_id 1 john 3 2 paul 3 3 smith 1 4 kevin 1 5 stewart 2 result has to look like this ename manager john smith paul smith smith john kevin john stewart paul can u plz help me out in this.....

8 Answers  


what are different types of collation sensitivity? : Sql dba

0 Answers  


Which are the different types of indexes in sql?

0 Answers  


Categories