This preview shows page 1. Sign up to view the full content.
Unformatted text preview: hin the user session
WWW.ExamMagic.COM - 22: Examine this code:
CREATE OR REPLACE TRIGGER update_emp
AFTER UPDATE ON emp
INSERT INTO audit_table (who, dated)
VALUES (USER, SYSDATE);
You issue an UPDATE command in the EMP table that results in
changing 10 rows.
How many rows are inserted into the AUDIT_TABLE?
D. A value equal to the number of rows in the EMP table.
Since the Trigger Type is not specified this Trigger defaults to a FOR EACH
STATEMENT Trigger. FOR EACH STATEMENT fire once for the triggering event,
therefore one record will be inserted into the audit_table.
B. If this was a FOR EACH ROW Trigger 10 rows would be inserted into the
C. This trigger will fire & result in 1 record inserted into the audit_table
D. If all records were updated and the Trigger was a FOR EACH ROW Level Trigger
then this would be the correct Response
WWW.ExamMagic.COM - 23: 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
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 $75,000,000 to the V_MAX_TEAM_SALARY
variable from within a stand-alone procedure?
www.ExamMagic.com 1Z0-147 A. V_MAX_TEAM_SALARY := 7500000;
B. BB_PACK.ADD_PLAYER.V_MAX_TEAM_SALARY := 75000000;
C. BB_PACK.V_MAX_TEAM_SALARY := 75000000;
D. This variable cannot be assigned a value from outside the package.
To assign a value for a public variable which is declared in the package header, all what
you have to do is do user the following syntax
WWW.ExamMagic.COM - 24: There is a CUSTOMER table in a schema that has a public
synonym CUSTOMER and you are granted all object privileges
on it. You have a procedure PROCESS_CUSTOMER that processes
customer information that is in the public synonym CUSTOMER
table. You have just created a new table called CUSTOMER
within your schema.
Which statement is true?
A. Creating the table has no effect and procedure PROCESS_CUSTOMER still accesses
data from public synonym CUSTOMER table.
B. If the structure of your CUSTOMER table is the same as the public synonym
CUSTOMER table then the procedure PROCESS_CUSTOMER is invalidated and
gives compilation errors.
C. If the structure of your CUSTOMER table is entirely different from the public
synonym CUSTOMER table then the procedure PROCESS_CUSTOMER
successfully recompiles and accesses your CUSTOMER table.
D. If the structure of your CUSTOMER table is the same as the public synonym
CUSTOMER table then the procedure PROCESS_CUSTOMER successfully
recompiles when invoked and accesses your CUSTOMER table.
The procedure will first look in the owner of the procedure schema before looking for the
A, B, C
WWW.ExamMagic.COM - 25: Which two statements about packages are true? (Choose two)
www.ExamMagic.com 1Z0-147 A. Both the specification and body are required components of a package.
B. The package specification is optional, but the package body is required.
C. The package specification is required, but the package body is optional.
D. The specification and body of the package are stored together in the database.
E. The specification and body of the package are stored separately in the database.
Correct Answer C: A Package must have a specification. A Package may also have a
body but it is not necessary. A Package without a package body are referred to as a
bodiless package. If a package specification contains only variables, constants, types,
exceptions, and a call specification, the package body is not required.
Correct Answer E: The package specification and body are stored separately in the
A. A package body is optional
B. The package specification is required and the package body is optional
D. The package specification and the body are stored in the database as separate objects.
WWW.ExamMagic.COM - 26: When creating a function in SQL *Plus, you receive this message:
"Warning: Function created with compilation errors."
Which command can you issue to see the actual error message?
A. SHOW FUNCTION_ERROR
B. SHOW USER_ERRORS
C. SHOW ERRORS
D. SHOW ALL_ERRORS
Correct Answer C: The SQL *Plus command SHOW ERRORS or SHOW ERR
Command extracts the error information from the USER_ERRORS view
A. this is an invalid object
View Full Document
- Spring '10