Professional Documents
Culture Documents
- 1. Which table should you query to determine when your procedure was last compiled?
- A. USER PROCEDURES
- B. USER PROCS
- C. USER OBJECTS
- 2. 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?
- C. SHOW ERRORS
3. Which data Dictionary View gives you the names and source code of all procedures created in your schema
A. USER_SOURCE
B. USER_OBJECTS
C. USER_PROCEDURES
D. USER_TEXT
A. BEFORE
B. AFTER
C. INSTEAD OF
D. NO TIMINGS
c. Declaration section
6.
DECLARE
BEGIN
EXCEPTION
WHEN ZERO_DIVIDE THEN
DBMS_OUTPUT.PUT_LINE ('A number cannot be divided by zero.');
END;
For what possible values of v_num1, v_num2, the code will generate an exception
7.
SET SERVEROUTPUT ON
<< outer_block >>
DECLARE
V_test NUMBER: = 123;
BEGIN
DBMS_OUTPUT.PUT_LINE ('Outer Block, v_test: '||v_test);
<< inner_block >>
DECLARE
v_test NUMBER := 456;
BEGIN
DBMS_OUTPUT.PUT_LINE ('Inner Block, v_test: '||v_test);
DBMS_OUTPUT.PUT_LINE ('Inner Block, outer_block.v_test: '||
outer_block.v_test);
END inner_block;
END outer_block;
8. Which two programming constructs can be grouped within a package? (Choose two)
A. Cursor
C. Trigger
D. Sequence
E. View
IS
BEGIN
END add_dept;
Which three are valid calls to the add_dept procedure? (Choose three)
A. add_dept;
B. add_dept(p_location=>’Accounting’, p_deptname=>’HRD’);
a. True
b. False
15. Which three are true statements about dependent objects? (Choose three)
D. All schema objects have a status that is recorded in the data dictionary.
E. You can view whether an object is valid or invalid in the USER_STATUS data dictionary view.
F. You can view whether an object is valid or invalid in the USER_OBJECTS data dictionary view.
16. Procedure “PROCA” has been created by “USER A” which extract rows from the PRODUCT_INFORMATION
table. Now “USER B” wants to execute the procedure from his schema. “USER A” granted the EXECUTE
Privilege to “USER B”. The DBA has informed “USER
A” that, whenever “USER B “executes the procedure, it should references PRODUCT_INTOMATION table from
“USER B” Schema. With what rights should “USER A” create the “PROCA” procedure.
A. AUTHID CURRENT_USER
B. AUTHID DEFINER
C. AUTHID ALL_USERS
D. Not required !!! By default when the execute privilege is granted the objects from the current
owner is referenced
IS
V_AMOUNT number;
PROCEDURE GENERATE_SUMMARY(………)
IS
BEGIN
CREDIT_LIMIT(….);
END GENERATE_SUMMARY;
END NIIT_PACK;
A v_amount
B credit_limit
C generate_summary
D NIIT_PACK
18. Which SQL statement returns the source code for a table?
19.You were asked to create a sub program that is applicable only to your main application? So, your
manager has informed you to create a local sub program but it should not be registered in your database? Which
section within the PLSQL block would you create the sub program?
A. Declarative Section
B. Begin Section
C. Exception section
D. Create an external program and call it within the PLSQL body
A. Declarative Section
B. Begin And End Section (Executable)
C. Exception Handling Section
D. Executable + Exception handling section