Multiple choice technology databases

Which two statements are true about REF CURSOR types?

  1. REF CURSOR types cannot be defined inside a package

  2. SYS_ REFCURSOR can be used to declare cursor variables in stored procedures and functions

  3. A REF CURSOR return type can be declared using %TYPE or %ROWTYPE or a user-defined record.

  4. Only a weak REF CURSOR type can be used as a formal parameter of a stored procedure or function.

Reveal answer Fill a bubble to check yourself
B,C Correct answer
Explanation

SYS_REFCURSOR is a pre-defined weak REF CURSOR type that can be used to declare cursor variables in stored procedures and functions, making option B correct. REF CURSOR return types can be declared using %TYPE, %ROWTYPE, or user-defined records, making option C correct. Option A is incorrect because REF CURSOR types can be defined inside packages. Option D is incorrect because both weak and strong REF CURSOR types can be used as formal parameters.