Vous êtes sur la page 1sur 2


1.- A PL/SQL block must consist of the following three sections:

A Declarative section, which begins with the keyword DECLARE and ends when the executable
section starts.
An Executable section, which begins with the keyword BEGIN and ends with END.
An Exception handling section, which begins with the keyword EXCEPTION and is nested within the
executable section.
a.- True
b.- False

2.- The %TYPE attribute:

a.- Is used to declare a variable according to a database column definition
b.- Is used to declare a variable according to a collection of columns in a database table or view
c.- Is used to declare a variable according to the definition of another declared variable
d.- Is prefixed with the database table and column name or the name of the declared variable

3.- When using the SELECT statement in PL/SQL, the INTO clause is required and queries can return
one or more rows.
a.- True
b.- False

4.- There are three types of loops: basic, FOR, and WHILE.
a.- True
b.- False

5.- Identify situations in which you can use the %ROWTYPE attribute.
a.- When you are not sure about the structure of the underlying database table
b.- When you want to retrieve an entire row from a table
c.- When you want to declare a variable according to another previously declared variable or
database column.

6.- Implicit cursors are declared by PL/SQL implicitly for all DML and PL/SQL SELECT statements. The
Oracle Server implicitly opens a cursor to process each SQL statement that is not associated with an
explicitly declared cursor.
a.- True
b.- False

7.- You can trap any error by including a corresponding handler within the exception-handling
section of the PL/SQL block.
a.- True
b.- False
8.- Subprograms:
a.- Are named PL/SQL blocks and can be invoked by other applications
b.- Are compiled only once

c.- Are stored in the database
d.- Do not have to return values if they are functions
e.- Can take parameters

9.- Formal parameters are literal values, variables, and expressions used in the parameter list of the
calling subprogram
a.- True
b.- False

10.- The package specification is the interface to your applications. It declares the public types,
variables, constants, exceptions, cursors, and subprograms available for use. The package
specification may also include PRAGMAs, which are directives to the compiler.
a.- True
b.- False

11.- Overloading subprograms in PL/SQL:

a.- Enables you to create two or more subprograms with the same name
b.- Requires that the subprogram’s formal parameters differ in number, order, or data type family
c.- Enables you to build flexible ways for invoking subprograms with different data
d.- Provides a way to extend functionality without loss of existing code; that is, adding new
parameters to existing subprograms
e.- All

12.- The Oracle-supplied UTL_FILE package is used to access text files in the operating system of the
database server. The database provides functionality through directory objects to
allow access to specific operating system directories.
a.- True
b.- False

13.- The NOCOPY hint allows the PL/SQL compiler to pass OUT and IN OUT parameters by reference
rather than by value. This enhances performance by reducing overhead when passing parameters.
a.- True
b.- False

14.- A triggering event can be one or more of the following:

a.- An INSERT, UPDATE, or DELETE statement on a specific table (or view, in some cases)
b.- A CREATE, ALTER, or DROP statement on any schema object
c.- A database startup or instance shutdown
d.- A specific error message or any error message
e.- A user logon or logoff
f.- All