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 |
What is sql injection vulnerability?
Can ddl statements be used in pl/sql?
How can we make an if statement within a select statement?
How do I truncate a word?
Whis is not false in primary key?
What does t sql mean?
What is the current version of sql?
How many types of primary keys are there?
How subquery works in sql?
how to drop an existing table in mysql? : Sql dba
what are dynamic queries in t-sql? : Transact sql
Hello All, Could any well write a query for the following scenario. Account(table name) No Name Amount 1 ABCD 2000.00 2 DEFG -2000.00 3 GHIJ 3000.50 4 JKLM 4000.00 5 MNOP 6000.00 O/p Should be in this format No Name Credit Debit 1 ABCD 2000.00 0 2 DEFG 0 -2000.00 3 GHIJ 3000.50 4 JKLM 0 -4000.00 5 MNOP 6000.00 o could any one give appropriate query for this Thnks in Advance