Reader small image

You're reading from  Oracle Advanced PL/SQL Developer Professional Guide

Product typeBook
Published inMay 2012
Reading LevelExpert
PublisherPackt
ISBN-139781849687225
Edition1st Edition
Languages
Right arrow
Author (1)
Saurabh K. Gupta
Saurabh K. Gupta
author image
Saurabh K. Gupta

Saurabh K. Gupta is a seasoned database technologist with extensive experience in designing high performance and highly available database applications. His technology focus has been centered around Oracle Database architecture, Oracle Cloud platform, Database In-Memory, Database Consolidation, Multitenant, Exadata, Big Data, and Hadoop. He has authored the first edition of this book. He is an active speaker at technical conferences from Oracle Technology Network, IOUG Collaborate'15, AIOUG Sangam, and Tech Days. Connect with him on his twitter handle (or SAURABHKG) or through his technical blog www.sbhoracle. wordpress.com, with comments, suggestions, and feedback regarding this book.
Read more about Saurabh K. Gupta

Right arrow

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 specification. The RETURN type can be a table record structure or a user-defined type.

6

a and b

Cursor variables can dynamically point to different work areas and, hence, different result sets. The biggest advantage of cursor variables is their ability to share the pointer variable amongst the client environments and other subprograms.

7

b

As the OPEN stage of cursor variables has to be explicitly specified, it cannot be opened with the cursor FOR loops.

8

a and d

A subtype inherits the complete table record structure and the NULL property of its columns.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Oracle Advanced PL/SQL Developer Professional Guide
Published in: May 2012Publisher: PacktISBN-13: 9781849687225

Author (1)

author image
Saurabh K. Gupta

Saurabh K. Gupta is a seasoned database technologist with extensive experience in designing high performance and highly available database applications. His technology focus has been centered around Oracle Database architecture, Oracle Cloud platform, Database In-Memory, Database Consolidation, Multitenant, Exadata, Big Data, and Hadoop. He has authored the first edition of this book. He is an active speaker at technical conferences from Oracle Technology Network, IOUG Collaborate'15, AIOUG Sangam, and Tech Days. Connect with him on his twitter handle (or SAURABHKG) or through his technical blog www.sbhoracle. wordpress.com, with comments, suggestions, and feedback regarding this book.
Read more about Saurabh K. Gupta