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 |
can i write pl/sql code in a package
What can I use instead of union in sql?
How to add Foreign key in a table after the creation of the table?
What is trigger in pl sql with examples?
Why we use cross join?
how can I make a script that can be bi-language (supports english, german)? : Sql dba
What is use of term?
What is minus?
What are the string functions in sql?
When you have to use a default "rollback to" savepoint of plvlog?
Source is Sales Table: Sno Prod Sales Sales_Amount 1 A 10 2000 2 A 20 1000 3 C 10 3000 4 D 30 4000 5 A 20 1000 Target : Sales_Count T_Sales_Amt Sales_Count(A) T_Sales_Amt(A) 90 11000 50 4000 In single query, pls tell me.
Why commit is not used in triggers?