Chapter 2 PLSQL Concepts

Team-Fly    

Oracle® PL/SQL® Interactive Workbook, Second Edition
By Benjamin Rosenzweig, Elena Silvestrova
Table of Contents
Appendix A.  Answers to Self-Review Questions


Chapter 2 PL/SQL Concepts

Lab 2.1 Self-Review Answers

A1:

Questions

Answers

Comments

1)

B

When the SELECT statements are combined into a PL/SQL program, they are sent to the server as a single unit thus reducing network traffic.

A2:

Questions

Answers

Comments

2)

B

Executable section is the only mandatory section for a PL/SQL block. As a result,

 BEGIN     NULL;  -- null statement  END; 

is a valid PL/SQL block.

A3:

Questions

Answers

Comments

3)

B

When a runtime error occurs in the PL/SQL block, control is passed to the exception-handling section of the block, where the error is evaluated and a specific exception is raised or executed.

A4:

Questions

Answers

Comments

4)

A

A PL/SQL compiler is able to detect only syntax errors. It cannot detect any runtime errors because they do not occur prior to the execution of the program.

A5:

Questions

Answers

Comments

5)

B

For named PL/SQL blocks, p-code is generated and stored in the database at the time of compilation. When named PL/SQL block is executed, its p-code is retrieved from the database and executed. For anonymous PL/SQL blocks, p-code is not stored in the database and is generated every time the PL/SQL block is executed.

Lab 2.2 Self-Review Answers

A1:

Questions

Answers

Comments

1)

B

A semicolon is a terminating symbol of an individual statement in the PL/SQL block.

A2:

Questions

Answers

Comments

2)

A

Substitution variables are used for input values only. They cannot be used to output values because no memory is allocated for them.

A3:

Questions

Answers

Comments

3)

A

The statement DBMS_OUTPUT.PUT_LINE uses dot notation as follows:

 package_name.procedure_name 

where package_name is the name of the package and procedure_name is the name of the procedure defined in the package.

A4:

Questions

Answers

Comments

4)

A

When a program completes, the information from the buffer is displayed on the screen.

A5:

Questions

Answers

Comments

5)

C

When the SET SERVEROUPUT ON command is used without specifying the size if the buffer, it enables the DBMS_OUTPUT.PUT_LINE statement and the default buffer size is used. The SIZE option changes the default buffer size to the specified size.


    Team-Fly    
    Top
     



    Oracle PL. SQL Interactive Workbook
    Oracle PL/SQL Interactive Workbook (2nd Edition)
    ISBN: 0130473200
    EAN: 2147483647
    Year: 2002
    Pages: 146

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net