A ref cursor is a dynamic cursor in which the contents of cursor can be changed dynamically at run time depending upon our requirement.
A ref cursor is basically a data type. A variable declared based on such data type is called cursor variable. We can assosiate differenct statement to a cursor variable dynamically.
The main advantage of ref cursor is 1. We can return result set to a client which we can't do using normal cursors. 2. It can be passed as parameter to sub programs.
Table of is use to define a collection type.
Collections are generally used for bulk processing. In cursors the data is processed sequentially. Using collections we can process all the data in one go.
Difference between 'TABLE OF' and 'REF CURSOR'
For what purposes these both might be used?
Profile Answers by dgandhi Questions by dgandhi
Questions by dgandhi