Académique Documents
Professionnel Documents
Culture Documents
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 10 Quiz
(Answer all questions in this section)
None of these.
DESCRIBE emp_pack
(*)
DESCRIBE emp_pack.del_emp
DESCRIBE emp_pack.show_emp
DESCRIBE del_emp
DESCRIBE show_emp
Correct Correct
2. Which of the following are good reasons for creating and using
Packages?
Related procedures, functions, and variables can be grouped together as a single
unit
We can recompile the package body without having to recompile the specification
We can create packages without needing any system privileges
The detailed package body code is invisible to the calling environment.
Mark for Review
(1) Points
A, B, C, and D
A and C
A, B, and D (*)
A and B
A, B, and C
Correct Correct
Body
Specification
None of these.
Correct Correct
True (*)
False
Correct Correct
Functions
Triggers (*)
Procedures
Explicit cursors
Global variables
Correct Correct
Section 10 Quiz
(Answer all questions in this section)
True
False (*)
Correct Correct
ol_pack.subprog(param1=>'Jane',param2=>30);
v_number := ol_pack.subprog(p1=>'Jane');
ol_pack.subprog('Jane',30); (*)
True (*)
False
Correct Correct
True (*)
False
Correct Correct
Section 10 Quiz
(Answer all questions in this section)
11. We want to remove the specification (but not the body) of package
BIGPACK from the database. Which of the following commands will do this? Mark
for Review
(1) Points
Correct Correct
12. We need to declare a package variable named MYVAR, which can be
referenced by any subprogram in the package but can NOT be referenced from outside
the package. In the following code, where should MYVAR be declared?
CREATE OR REPLACE PACKAGE varpack IS
-- Point A
...
END varpack;
CREATE OR REPLACE PACKAGE BODY varpack IS
-- Point B
PROCEDURE varproc IS
-- Point C
BEGIN
...
END varproc;
PROCEDURE ...
...
-- Point D
END varpack;
Mark for Review
(1) Points
Point C
Point A
Point D
Point B (*)
Correct Correct
13. Which one of the following queries would you use to see the
detailed code of a package called EMP_PKG? Mark for Review
(1) Points
SELECT text FROM user_source WHERE name = 'EMP_PKG' AND type = 'PACKAGE BODY'
ORDER BY line; (*)
SELECT text FROM all_source WHERE name = 'EMP_PKG' AND type = 'PACKAGE' ORDER
BY line;
SELECT source FROM user_packages WHERE name = 'EMP_PKG' AND type = 'PACKAGE
BODY' ORDER BY line;
SELECT text FROM user_source WHERE name = 'EMP_PKG' AND type = 'PACKAGE'
ORDER BY line;
Correct Correct
Correct Correct
15. Your schema contains a package called EMP_PKG. You want to remove
the package body but not the specification. The correct syntax to do this is: DROP
BODY emp_pkg; True or False? Mark for Review
(1) Points
True
False (*)
Correct Correct