Pages

Difference between Cursor and Refcursor

Difference between Cursor and Refcursor


Cursor 1. It is a sql private work area.
Refcur 1. It is a data type

Cursor 2. Where ever we use cursor we need to declare it again.
Refcur 2. Once if we declare we can use anywhere in package.

Cursor 3. We can not print it directly.
Refcur 3. We can print it directly.

Cursor 4. It has 4 attributes.
Refcur 4. It has no attributes.

Cursor 5. It stores and process the information of query temporarily.
Refcur 5. It stores the output of the query temporarily.

Cursor 6. We can not pass it as an argument.
Refcur 6. We can pass it as an argument.

Cursor 7. It uses open and close keywords.
Refcur 7. It uses only open keyword.

Cursor 8. It is of two types explicit and implicit.
Refcur 8. It is only one type.

Cursor 9. It can be declared by oracle if the output has single row.
Refcur 9. User needs to declare it.

Cursor 10. It should be assigned to another variable.
Refcur 10. No need of assigning to another variable.
eg:
Print (refcusor variable name)