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 to analyze tables with 'mysqlcheck'? : Sql dba
Which normal form is best?
What are different functions in sql?
What are basic techniques of indexing?
Can a varchar be a primary key?
How can I see all tables in sql?
How to remove duplicate rows from a table?.
What pl/sql package consists of?
What does plv msg allows you to do?
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.....
what are different types of collation sensitivity? : Sql dba
Which are the different types of indexes in sql?