Exam 7: PL/SQL Packages
Exam 1: Introduction To PL/SQL54 Questions
Exam 2: Basic PL/SQL Block Structures81 Questions
Exam 3: Handling Data In PL/SQL Blocks51 Questions
Exam 4: Cursors and Exception Handling65 Questions
Exam 5: Procedures75 Questions
Exam 6: Functions51 Questions
Exam 7: PL/SQL Packages68 Questions
Exam 8: Program Unit Dependencies61 Questions
Exam 9: Database Triggers54 Questions
Exam 10: Oracle-Supplied Packages, Dynamic SQL, and Hiding Source Code85 Questions
Select questions type
When compiling objects that call packaged program units, which of the following statements is True?
Free
(Multiple Choice)
4.9/5
(35)
Correct Answer:
A
The term user scope is the range of visibility for a particular element or construct contained in a package. _________________________
Free
(True/False)
4.8/5
(36)
Correct Answer:
False
Define the term package, and explain why it is used.
Free
(Essay)
4.7/5
(24)
Correct Answer:
A package is another type of PL/SQL construct that can house multiple program units and contain other constructs, such as variables and cursors. Using packages not only allows programmers to organize program units into related groups, but also enables the establishment of private program units, the sharing of variable values across program units, the overloading of program units, easier user privilege granting, and improved performance. Packages also lead to improved handling of dependencies.
The AUTHID CURRENT_USER clause is used to override definer-rights behavior. _________________________
(True/False)
4.7/5
(32)
The DEL command can be used to remove the package specification and body. _________________________
(True/False)
4.7/5
(33)
CREATE OR REPLACE PACKAGE metric_pkg IS cup_to_liter CONSTANT NUMBER := .24;
Pint_to_liter CONSTANT NUMBER := .47;
Qrt_to_liter CONSTANT NUMBER := .95;
END;
Which of the following statements about the code fragment above is correct?
(Multiple Choice)
4.7/5
(34)
A(n) ____________________ procedure is a procedure in a package that runs only once, when the package is initially invoked.
(Short Answer)
4.8/5
(32)
One advantage that packages provide is that constructs, such as variables, cursors, types, and exceptions, declared in the specification are ____________________.
(Short Answer)
4.8/5
(40)
The ____________________ data dictionary view is also useful to identify what packages exist on the system.
(Short Answer)
4.8/5
(36)
The ____ packaged function purity level does not modify database tables.
(Multiple Choice)
4.8/5
(42)
The pragma level defines what type of data structures the function reads or modifies.
(True/False)
4.8/5
(28)
The statement ____ would successfully declare a REF CURSOR data type.
(Multiple Choice)
4.9/5
(29)
CREATE OR REPLACE PACKAGE ordering_pkg IS
Pv_total_num NUMBER(3,2);
PROCEDURE order_total_pp
(p_bsktid IN NUMBER,
P_sub OUT NUMBER);
FUNCTION ship_calc_pf
(p_qty IN NUMBER)
RETURN NUMBER;
END;
When creating a package body for the package specification above, which of the following statements is incorrect?
(Multiple Choice)
4.9/5
(41)
A package specification can contain declarations for procedures, functions, variables, exceptions, cursors, and types.
(True/False)
5.0/5
(29)
When the values of package element persist throughout a user session and, therefore, can be referenced in code within various parts of the application during a user session, the elements are considered to be global. _________________________
(True/False)
4.9/5
(36)
The query to be used to populate a ____________________ data type can be determined at run time.
(Short Answer)
4.8/5
(34)
If a cursor is declared in a package specification that referenced the PV_TOTAL_NUM package variable, the variable ____.
(Multiple Choice)
5.0/5
(42)
Developers can use the PRAGMA RESTRICT_REFERENCES compiler instruction to indicate the purity level of the function in the package specification.
(True/False)
4.9/5
(38)
Package elements are considered public if they can be called only from other program units within the same package. _________________________
(True/False)
4.8/5
(33)
Showing 1 - 20 of 68
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)