DEVFYI - Developer Resource - FYI

What is use of a cursor variable? How it is defined?

ORACLE Interview Questions and Answers (Part 4)


(Continued from previous question...)

553. What is use of a cursor variable? How it is defined?

A cursor variable is associated with different statements at run time, which can hold different values at run time. Static cursors can only be associated with one run time query. A cursor variable is reference type (like a pointer in C).
Declaring a cursor variable:
TYPE type_name IS REF CURSOR RETURN return_type type_name is the name of the reference type,return_type is a record type indicating the types of the select list that will eventually be returned by the cursor variable.

(Continued on next question...)

Other Interview Questions