Anda di halaman 1dari 5

Section 1 Quiz

(Answer all questions in this section)

1. Given below are the parts of a PL/SQL block: Mark for Review
1. END; (1) Points
2. EXCEPTION
3. DECLARE
4. BEGIN

Arrange the parts in order.

2,1,4,3
3,2,4,1
3,4,2,1 (*)
4,3,2,1

Correct

2. This PL/SQL anonymous block will execute successfully. True or False? Mark for Review
DECLARE (1) Points
v_date DATE := SYSDATE;
DBMS_OUTPUT.PUT_LINE(v_date);
END;

True
False (*)

Correct

3. Which statements are mandatory in a PL/SQL block? (Choose two.) Mark for Review
(1) Points

(Choose all correct answers)

BEGIN (*)
DECLARE
END; (*)
EXCEPTION

Correct

4. Which PL/SQL block type must return a value? Mark for Review
(1) Points
Function (*)
Anonymous
Procedure
Package

Correct

5. In which part of the PL/SQL block are declarations of variables defined? Mark for Review
(1) Points

Definition
Exception
Declarative (*)
Executable

Correct
6. Which of
the Mark for Review
following (1) Points
statements
about
PL/SQL
and SQL is
true?

PL/SQL and SQL are both ANSI-compliant.


PL/SQL and SQL can be used with many types of databases, including
Oracle.
PL/SQL and SQL are both Oracle proprietary programming languages.
PL/SQL allows basic program logic and control flow to be combined with
SQL statements. (*)

Correct

7. Third-generation programming languages include all except _____ and _____. Mark for Review
(1) Points

(Choose all correct answers)

Java
SQL (*)
MySQL (*)
C++
PL/SQL

Incorrect. Refer to Section 1 Lesson 1.

8. Which of the following statements is true? Mark for Review


(1) Points

None of these are correct.


You can embed PL/SQL statements within SQL code.
You can embed procedural constructs within SQL code.
You can embed SQL statements within PL/SQL code. (*)

Correct

9. Nonprocedural languages allow the programmer to produce a result when a Mark for Review
series of steps are followed. True or False?
(1) Points

True
False (*)

Incorrect. Refer to Section 1 Lesson 1.

10. In which three ways does PL/SQL extend the SQL programming language? Mark for Review
(1) Points

(Choose all correct answers)

By adding compound constructs.


By adding conditional control. (*)
By adding procedural constructs. (*)
By adding iterative control. (*)

Correct
11. When Mark for Review
multiple SQL
statements (1) Points
are
combined
into PL/SQL
blocks,
performance
will typically
improve.
True or
False?

True (*)
False

Incorrect. Refer to Section 1 Lesson 2.

12. The fact that PL/SQL is portable is a good thing because: Mark for Review
(1) Points

PL/SQL code can be developed on one platform and deployed on


another (*)
Exceptions can be ported to different operating systems
Blocks can be sent to the operating system.
PL/SQL code can be run on any operating system without a database

Correct

13. Which of the following statements about exception handling in PL/SQL is Mark for Review
false?
(1) Points

None of these are false (*)


All of these are false
Exception handling code tells your program what to do when an error is
encountered.
You can prepare for database exceptions by creating exception
handlers.
You can prepare for application exceptions by creating exception
handlers.

Incorrect. Refer to Section 1 Lesson 2.

14. PL/SQL differs from C and Java in which of the following ways? (Choose Mark for Review
two.)
(1) Points

(Choose all correct answers)

It does not support object-oriented programming.


It is not portable to other operating systems.
It is the most efficient language to use with an Oracle database. (*)
It is the most complex programming language to learn.
It requires an Oracle database or tool. (*)
Correct

15. Using Oracle Application Express, you can create Web applications that Mark for Review
include PL/SQL. True or False?
(1) Points

TRUE (*)
FALSE

Correct

Anda mungkin juga menyukai