What is the use of Ref cursor, how it is diifferent than the normal cursor.

Showing Answers 1 - 6 of 6 Answers

Ramesh

  • Mar 20th, 2007
 

Ref Cursor is used to retrieve different Active Set from different Table,
whereas Cursor can retrieve only active set from the same table.

  Was this answer useful?  Yes

A ref cursor is basically a data type. A variable created based on such data type is called a cursor variable.
Dynamic cursors are declared using reference cursors.
Differences:
1. Cusor is static in nature. Once a query is assosiated with a cursor, the contents were fixed. Where as in ref cursors the content can be changed dynamically depending upon the requirement.
2.Reference cursors can be returned to the client where as cursors can't.
3.We can't declare ref cursor as global in package but the cursors can be declared globally in a package.
4.Ref cursors can be passed as parameters to subroutines, cursors can't .

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