Professional Documents
Culture Documents
Using
Mark for Review
Oracle
(1) Points
Application
Express,
you can
create Web
applications
that include
PL/SQL.
True or
False?
TRUE (*)
FALSE
Correct
True (*)
False
Correct
Correct
Section 1
(Answer all questions in this section)
Correct
2,1,4,3
3,2,4,1
4,3,2,1
3,4,2,1 (*)
Correct
subroutine
procedure
function
anonymous (*)
Correct
Section 2
(Answer all questions in this section)
True (*)
False
Correct
They are optional but can make a PL/SQL block execute faster
They are the building blocks of every PL/SQL program (*)
They are sequences of characters including letters, digits, tabs,
returns and symbols (*)
They are named objects stored in the database
Correct
Page 2 of 10
Section 2
(Answer all questions in this section)
Correct
Correct
Chang (*)
Susan
ChangChang
SusanChang
The code will fail with an error
Correct
(*)
It cannot be done because the outer block's v_myvar is in scope
but not visible at Line A.
Section 2
(Answer all questions in this section)
Correct
17.What are the data types of the variables in the following declaration?
Mark for Review
(1) Points
DECLARE
fname VARCHAR2(25);
lname VARCHAR2(25) DEFAULT 'fernandez';
BEGIN
…
Composite
LOB
Scalar (*)
PLS_INTEGER
Correct
18.You need to declare a variable to hold a value which has been read
Mark for Review
from the SALARY column of the EMPLOYEES table. Which of the
(1) Points
following is an advantage of declaring the variable as:
employees.salary%TYPE ?
Correct
True (*)
False
Correct
Correct
Section 2
(Answer all questions in this section)
21.If today's date is 14th June 2007, which statement will correctly
Mark for Review
convert today's date to the value: June 14, 2007 ?
(1) Points
49
14 (*)
18
81
Correct
23.Examine the following code:
Mark for Review
(1) Points
DECLARE
x VARCHAR2(20);
BEGIN
x:= 5 + 4 * 5 ;
DBMS_OUTPUT.PUT_LINE(x);
END;
29
45
14
25 (*)
Correct
True (*)
False
Correct
Correct.
Not correct. (*)
Correct
True (*)
False
Correct
Section 3
(Answer all questions in this section)
True
False (*)
True
False (*)
Correct
True or False?
True
False (*)
Correct
Correct
Section 3
(Answer all questions in this section)
SQL%ROWCOUNT (*)
SQL%COUNT
SQL%NUMBER
SQLROW%COUNT
Correct
32.How many DML statements can be included in a single transaction?
Mark for Review
(1) Points
Correct
One
As many as you can execute before the database does an
AUTOSAVE.
As many as you want until a different DML statement
(UPDATE, DELETE or MERGE) is executed.
As many as you want until you do a COMMIT or ROLLBACK.
(*)
Correct
34.Does PL/SQL allow you to have a variable with the same name as a
Mark for Review
database column?
(1) Points
No
Yes (*)
Correct
(*)
SELECT salary FROM employees
WHERE department_id=60;
DROP TABLE locations;
CREATE TABLE new_emps (last_name VARCHAR2(10),
first_name VARCHAR2(10));
Correct
Section 3
(Answer all questions in this section)
SQL%ROWCOUNT (*)
SQL%COUNT
SQL%NUMBER
SQLROW%COUNT
Correct
Correct
One
As many as you can execute before the database does an
AUTOSAVE.
As many as you want until a different DML statement
(UPDATE, DELETE or MERGE) is executed.
As many as you want until you do a COMMIT or ROLLBACK.
(*)
Correct
34.Does PL/SQL allow you to have a variable with the same name as a
Mark for Review
database column?
(1) Points
No
Yes (*)
Correct
(*)
SELECT salary FROM employees
WHERE department_id=60;
DROP TABLE locations;
CREATE TABLE new_emps (last_name VARCHAR2(10),
first_name VARCHAR2(10));
Correct
Section 3
(Answer all questions in this section)
Correct
Section 4
(Answer all questions in this section)
CASE statement
CASE expression
LOOP statement (*)
IF statement
Correct
Correct
Store all the numbers from 1 to 144 in a table, then fetch and
display them using a cursor.
Use two nested FOR loops. (*)
Create a function which accepts two numbers as IN parameters
and returns their product. Invoke the function 144 times.
Write an anonymous block which contains 144 calls to
DBMS_OUTPUT, each looking like:
DBMS_OUTPUT.PUT_LINE('7 x 9 = 63');
Correct
Section 4
(Answer all questions in this section)
41.What statement allows you to exit the inner loop at Point A in the
Mark for Review
following block?
(1) Points
DECLARE
v_outer_done CHAR(3) := 'NO';
v_inner_done CHAR(3) := 'NO';
BEGIN
LOOP -- outer loop
...
LOOP -- inner loop
...
v_inner_done := "YES";
... -- Point A
...
END LOOP;
...
EXIT;
...
END LOOP;
END;
Correct
42.Which of the following statements are true about any of the PL/SQL
Mark for Review
conditional control structures such as IF ... , CASE … , and loops?
(1) Points
Correct
lost (*)
won
NULL
False
Correct
Correct
45.What type of control structures are repetition statements that enable
Mark for Review
you to execute statements in a PLSQL block repeatedly?
(1) Points
IF statements
CASE expressions
CASE statements
Loops (*)
Correct
Section 4
(Answer all questions in this section)
Poor
Null
In Between (*)
Very Good
Correct
Null
1
0 (*)
2
Correct
48.In a WHILE loop, the statements inside the loop must execute at least
Mark for Review
once. True or False?
(1) Points
TRUE
FALSE (*)
Correct
FOR i IN 10 .. 1 LOOP
FOR i IN REVERSE 10 .. 1 LOOP
FOR i IN 1 .. 10 BY -1 LOOP
FOR i IN REVERSE 1 .. 10 LOOP (*)
Correct
It will display 1, 2, 3.
It will display 2, 3, 4.
It will result in an error because you cannot modify the counter in
a FOR loop. (*)
It will result in an error because the counter was not explicitly
declared.
Correct