Unformatted text preview: _id;
IF v_sal < 500 THEN
v_raise := .05;
ELSIP v_sal < 1000 THEN
v_raise := .07;
v_raise := .04;
RETURN p_sal * tax_rate;
What is the name of the private procedure in this package?
www.ExamMagic.com 1Z0-147 A. CALC_TAX
This procedure is not declared in the package specification and therefore it is not public.
Constructs declared and defined in the package body are known as private constructs.
These constructs are available from inside the package only and cannot be called from
outside the package.
A, B, D & E Procedures declared in the package specification are public constructs and
they can be
referenced from outside the package.
F. Is the Package Name and it is not a Public or Private Procedure
WWW.ExamMagic.COM - 44: What can you do with the DBMS_LOB package?
A. Use the DBMS_LOB.WRITE procedure to write data to a BFILE.
B. Use the DBMS_LOB.BFILENAME function to locate an external BFILE.
C. Use the DBMS_LOB.FILEEXISTS function to find the location of a BFILE.
D. Use the DBMS_LOB.FILECLOSE procedure to close the file being accessed.
A. DBMS_LOB.WRITE is used to write to Internal LOBs.
The internal LOB is stored inside the Oracle server. A BLOB, NCLOB, or CLOB can be
one of the following:
An attribute of a user-defined type
A column in a table
A bind or host variable
A PL/SQL variable, parameter, or result
Internal LOBs can take advantage of Oracle features such as:
Redo logging and recovery mechanisms
Transactions with commit or rollbacks
B. BFILENAME is a built-in function that initializes a BFILE column to point to an
external file. Use the BFILENAME function as part of an INSERT statement to initialize
a BFILE column by associating it with a physical file in the server file system. You can
use the UPDATE statement to change the reference target of the BFILE. A BFILE can be
initialized to NULL and updated later by using the BFILENAME function.
C. DBMS_LOB.FILEEXISTS function to find if the file exits on the server
WWW.ExamMagic.COM - 45: Examine this package:
CREATE OR REPLACE PACKAGE BB_PACK
PROCEDURE ADD_PLAYER(V_ID IN NUMBER, V_LAST_NAME VARCHAR2,
CREATE OR REPLACE PACKAGE BODY BB_PACK
V_ID IN NUMBER, V_AB IN NUMBER DEFAULT 4, V_HITS IN NUMBER)
SET AT_BATS = AT_BATS + V_AB,
HITS = HITS + V_HITS
WHERE PLAYER_ID = V_ID;
(V_ID IN NUMBER, V_LAST_NAME VARCHAR2, V_SALARY NUMBER)
INSERT INTO PLAYER(ID,LAST_NAME,SALARY)
VALUES (V_ID, V_LAST_NAME, V_SALARY);
Which statement will successfully assign .333 to the V_PLAYER_AVG
variable from a procedure outside the package? www.ExamMagic.com 1Z0-147
A. V_PLAYER_AVG := .333;
B. BB_PACK.UPD_PLAYER_STAT.V_PLAYER_AVG := .333;
C. BB_PACK.V_PLAYER_AVG := .333;
D. This variable cannot be assigned a value from outside of the package.
Constructs declared and defined in the package body are private constructs and they can't
be invoked outside of the package.
A. Even if this variable was declared in the package specification, this is the wrong
syntax for referencing a global variable from outside the package.
B. Nice try but this is wrong, you can't reference a package that is defined in the package
body from outside of the package.
C. This is the correct syntax for assigning a value to a global variable but this is wrong
because the variable was not declared in the package specification.
WWW.ExamMagic.COM - 46: Examine this code:
CREATE OR REPLACE PACKAGE comm_package
g_comm NUMBER := 10;
PROCEDURE reset_comm(p_comm IN NUMBER);
User Jones executes the following code at 9:01am:
EXECUTE comm_package.g_comm := 15
User Smith executes the following code at 9:05am:
EXECUTE comm_paclage.g_comm := 20
Which statement is true?
A. g_comm has a value of 15 at 9:06am for Smith.
B. g_comm has a value of 15 at 9:06am for Jones.
C. g_comm has a value of 20 at 9:06am for both Jones and Smith.
D. g_comm has a value of 15 at 9:03 am for both Jones and Smith.
E. g_comm has a value of 10 at 9:06am for both Jones and Smith.
F. g_comm has a value of 10 at 9:03am for both Jones and Smith
Answer: B www.ExamMagic.com 1Z0-147 WWW.ExamMagi
c.COM - 47: Examine this code:
CREATE OR REPLACE FUNCTION gen_email_name
(p_first_name VARCHAR2, p_last_name VARCHAR2, p_id NUMBER)
v_email_name := SUBSTR(p_first_name, 1, 1) ||
SUBSTR(p_last_name, 1, 7) ||
SET email = v_email_name
View Full Document
- Spring '10
- Stored procedure, Incorrect Answers