Aaaaaa
Aaaaaa
Aaaaaa
1. A
Scalar Mark for Review
data (1) Points
type
holds
a(n)
____
value.
Single (*)
Multi
Large
image
Correct
VARCHAR2s
LOBs (*)
Scalar data types
Variables
4. If you use the %TYPE attribute, you can avoid hard-coding the column name. True
or False? Mark for Review
(1) Points
True
False (*)
Correct
World
HelloWorld
The code will fail since the inner variable is not within the scope of the outer
block. (*)
Hello World
6. If an
outer Mark for Review
block is (1) Points
labeled,
the
inner
block
must
be
labeled
also.
True or
False?
True
False (*)
7. Assignment statements can continue over several lines in PL/SQL. True or False?
Mark for Review
(1) Points
True (*)
False
Correct
True (*)
False
Correct
9. What good programming practice would make this code easier to follow?
Mark for Review
DECLARE (1) Points
v_myvar VARCHAR2(20);
BEGIN
DECLARE
v_myvar VARCHAR2(15);
BEGIN
...
END;
END;
10. Which of the following makes PL/SQL code easier to read and maintain?
Mark for Review
(1) Points
Correct
11. Which of
the Mark for Review
following (1) Points
is
correct?
V_FAMILY_NAME = SMITH;
v_family_name := 'SMITH'; (*)
v_family_name := SMITH;
v_family_name = SMITH;
Correct
The block will fail because the character value "Today" cannot be implicitly
converted to a date. (*)
The block will execute and display today's date.
The block will execute and display the word "Today".
Correct
True
False (*)
Correct
14. Delimiters are _____ that have special meaning to the Oracle database.
Mark for Review
(1) Points
variables
identifiers
symbols (*)
*/ / *
/* */ (*)
??
:: ::
Correct
1. What good
programming Mark for Review
practice would (1) Points
make this code
easier to
follow?
DECLARE
v_myvar
VARCHAR2(20);
BEGIN
DECLARE
v_myvar
VARCHAR2(15);
BEGIN
...
END;
END;
True
False (*)
Correct
3. Which of the following is a composite data type?
Mark for Review
(1) Points
CLOB
VARCHAR2
RECORD (*)
DATE
Correct
4. A datatype specifies and restricts the possible data values that can be
assigned to a variable. True or False? Mark for Review
(1) Points
True (*)
False
Correct
Correct
6. A
variable Mark for Review
must (1) Points
have a
value if
NOT
NULL is
specified.
True or
False?
True (*)
False
Correct
7. The LENGTH and ROUND functions can be used in PL/SQL statements. True or
False? Mark for Review
(1) Points
True (*)
False
Correct
8. If today's date is 14th June 2007, which statement will correctly convert today's
date to the value: June 14, 2007 ? Mark for Review
(1) Points
Correct
Correct
11. Which of
the Mark for Review
following (1) Points
are
required
when
declaring
a
variable?
(Choose
two.)
CONSTANT
Data type (*)
Identifier name (*)
NOT NULL
Correct
True (*)
False
Correct
yesterday (*)
yesterday's date
number_of_students_in_the_class
#students
v$testresult (*)
Correct
14. Examine the following code. What is the scope of variable v_myvar?
DECLARE Mark for Review
v_myvar NUMBER; (1) Points
BEGIN
v_myvar := 6;
DECLARE
v_hervar NUMBER;
BEGIN
v_hervar := 4;
END;
END;
Neither block
Only the outer block
Only the inner block
Both the inner and the outer block (*)
Correct
15. For the anonymous block below, what is the correct reference to the father's
date of birth in the inner block? Mark for Review
(1) Points
<< outer>>
DECLARE
v_father_name VARCHAR2(20):='Patrick';
v_date_of_birth DATE:='20-Apr-1972';
BEGIN
DECLARE
v_child_name VARCHAR2(20):='Mike';
v_date_of_birth DATE:='12-Dec-2002';
...
outer.v_date_of_birth (*)
<< outer.v_date_of_birth >>
<< outer>>v_date_of_birth
v_date_of_birth.outer
Correct