PL SQL Mid Term Exam Semester 2
PL SQL Mid Term Exam Semester 2
PL SQL Mid Term Exam Semester 2
When a user session changes the value of a package variable, the new val
ue can immediately be seen by other sessions. True or False? Mark for Review
(1) Points
True
False (*)
Correct
Correct
I do like
to be
beside the seaside
I do like to be
I do liketo be
(*)
I do like to be beside the seaside
Correct
Correct
mypack.myproc(35);
(*)
IF NOT mypack.myfunc(SYSDATE) THEN
DBMS_OUTPUT.PUT_LINE('Message');
END IF;
(*)
myproc(40);
v_num := mypack.myproc(22);
Correct
Correct
Correct
Correct
Correct
21. Package OLDPACK is in your schema. What will happen when the following s
tatement is executed?
DROP PACKAGE oldpack; Mark for Review
(1) Points
The body will be dropped but the specifi
cation will be retained.
The specification will be dropped but th
e body will be retained.
Both the specification and the body will
be dropped. (*)
The statement will fail because you must
drop the body before you can drop the specification.
Correct
Correct
Correct
Section 10
26. Examine the following trigger. It should raise an applic
ation error if a user tries to update an employee's last name. It should allow u
pdates to all other columns of the EMPLOYEES table. What should be coded at line
A?
CREATE TRIGGER stop_ln_trigg
BEFORE UPDATE ON employees
BEGIN
-- Line A
RAISE_APPLICATION_ERROR(-20201,'Updating last name not allowed');
END IF;
END; Mark for Review
(1) Points
IF UPDATING LAST_NAME THEN
IF UPDATING('LAST_NAME') THEN (*)
IF UPDATE('LAST_NAME') THEN
IF UPDATING THEN
Correct
Correct
31. A trigger can be a public subprogram within a PL/SQL package. True or Fa
lse? Mark for Review
(1) Points
True
False (*)
32. Which of the following are NOT stored inside the databas
e? (Choose two.) Mark for Review
(1) Points
(Choose all correct answers)
A PL/SQL package specification
A database trigger
An anonymous block (*)
An application trigger (*)
A sequence
Correct
Correct
Correct
Correct
37. A DML statement trigger fires only once for each trigger
ing DML statement, while a row trigger fires once for each row processed by the
triggering statement. True or False? Mark for Review
(1) Points
True (*)
False
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct