Chapter 2, Designing PL/SQL Code

Question No.

Answer

Explanation

1

c

All the cursor attributes, except %ISOPEN, must be accessed within the cursor execution cycle. Once the cursor is closed, the cursor work area is flushed.

2

b and c

The use of cursor FOR loops prevents erratic coding. Fetching the cursor data into a record reduces the overhead of declaring block variables.

3

b

Implicit cursor attributes hold the value of the last executed SQL query. Therefore, it must be referenced just after the SQL query

4

a and b

Cursor variables can point to several cursor objects (cursor work area) in shared memory. Ref cursor types can be declared in a package specification.

5

a

A strong ref cursor must mandatorily have the RETURN type ...

Get Oracle Advanced PL/SQL Developer Professional Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.