What are the PL/SQL Statements used in cursor processing ?

 DECLARE  CURSOR  cursor  name,  OPEN  cursor  name,  FETCH cursor name INTO  or Record types, CLOSE cursor name.

Showing Answers 1 - 3 of 3 Answers

mahendra

  • Sep 29th, 2005
 

Also Fetch BULK Collect into

  Was this answer useful?  Yes

fancyoracle

  • Aug 14th, 2007
 

There are two ways of processing a cursor output. These mainly depend on the type of cursor used. Cursors can be
1) Static      : Declared in declarations section with a definate command
2) Dynamic : Usually passed a string, which is formulated in program based on various conditions.

If the cursor is dynamic, it needs to be processed thro open cursor, fetch into, loop and end loop. This is because such cursors need to be opened into a ref cursor with "open cursor" command.
If the cursor is static, it can be processed thro a cursored for loop or by the method mentioned above.
Cursored for loop takes the pain to open and close the cursor automatically.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions