Ref Cursor

Where you can use Ref Cursor in your career as a oracle apps technical consultant with an example?(asked by Accenture people)

Questions by rambabu9

Showing Answers 1 - 3 of 3 Answers

Parveen Jangra

  • Sep 10th, 2014
 

Ref Cursors: They are also known as pointer variables because they can be used dynamically throughout the program to execute SQL statements.

Points to Remember:

--Ref cursors can only be used with collection variables.
--Unlike other cursors Ref Cursors always needs to be closed and BULK COLLECTED before using them into loops.
--Ref cursors must be manipulated using loops.
--They can be used anytime and any number of time throughout the block, but while using them for different SQL statements bear in mind that:

1.) The resultant column match the datatype and no. of columns selected because sometime though they will be executed but either they will not produce any result or will produce ambiguous results.

--Specifically speaking a Ref cursor is a PL/SQL Datatype whose value is memory address of a query work area on the database.

--Bear in mind that a ref cursor is a pointer and doesnt contain any data in it.

--A ref cursor data can be accessed in Forward only manner.

--A ref cursor is READ ONLY and hence not updatable.

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