Q1. View the Exhibit to examine the PIVSQL block.
Which statement is true about the output of the PL/SQL block?
A. It executes and the Output is emprec.deptname: .
B. It executes and the Output is emprec.deptname: Sales.
C. It produces an error because NULL is assigned to the emprec.empid field in the record.
D. It produces an error because the CHECK constraint is violated while assigning a value to the emprec.deptid field in the record.
Answer: A
Q2. Which statement is true about triggers on data definition language (DDL) statements?
A. They can be used to track changes only to a table or index.
B. They can be defined by all users in the database or only by a specific user.
C. They are fired only when the owner of the object Issues the DDL statement.
D. They can be used to track changes to a table, table space, view, or synonym.
Answer: D
Q3. Which two statements are true about the exit statement encountered in loop? (Choose two)
A. The PL/SQL block execution terminates immediately after the exit statement.
B. The loop completes immediately and control passes to the statement after end loop
C. The statements after the exit statement in the Iteration are not executed before terminating the LOOP.
D. The current iteration of the loop completes immediately and control passes to the next iteration of the loop.
Answer: B,D
Explanation: Reference: http://docs.oracle.com/cd/B10501_01/appdev.920/a96624/04_struc.htm
Q4. View the Exhibit and examine the structure of the AUDIR_CUST table.
Exhibit Missing
CUST_ID and CUST_LIMIT are existing columns in the CUSTOMER table.
Examine the following trigger code:
Which statement is true about the above trigger?
A. It gives an error on compilation because it should be a statement-level trigger.
B. It compiles and fires successfully when the credit limit is updated in the customer table.
C. It gives an error on compilation because of the commit command in the trigger code
D. It compiles successfully, but gives an error when the credit limit is updated in the CUSTOMER table because the PRAGMA AUTONOMOUS_TRANSACTION statement should be introduced in the trigger.
Answer: D
Q5. Which two statements are true about the usage of the cursor for loops? (Choose two.)
A. The cursor needs to be closed after the iteration is complete.
B. The implicit open, fetch, exit, and close of the cursor happen.
C. The record type must be explicitly declared to control the loop.
D. The PL/SQL creates a record variable with the fields corresponding to the columns of the cursor result set.
Answer: B,D
Q6. You execute the following block of code:
Which statement is true about the outcome?
A. Both Output statements show different values.
B. Both output statements show exactly the same values.
C. It gives an error because the nested blocks are not labeled.
D. It gives an error because the V_CUSTOMER variable have different types in the nested blocks
Answer: A
Q7. Examine the following code:
Which two statements are true about the above function? (Choose two.)
A. It can be used only in a parallelized query.
B. It can be used in both a parallelized query and a parallelized DML statement.
C. It can be used only in a parallelized data manipulation language (DML) statement.
D. It can have a separate copy run in each of the multiple processes when called from a SQL statement that is run in parallel.
E. It requires a PRAGMA RESTRICT_REFERENCES declaration with RNDS, WNDS, RNPS, and WNPS specified in order to use parallel optimization.
Answer: B,E
Q8. You create the following table and execute the following code:
Which statement is true about the outcome of the above code?
A. It executes successfully and all the rows are updated.
B. It gives an error but saves the inserted rows and the update to the first row.
C. It gives an error but saves the inserted rows; however, no rows are updated.
D. It gives an error and all the data manipulation language (DML) statements are rolled back
Answer: A
Q9. Which three statements are true about wrapping? (Choose three.)
A. The PL/SQL wrapper detects and reports only syntax errors.
B. The PL/SQL wrapper detects and reports both syntax and semantic errors.
C. When wrapping a package or object type, both the body and specification should be wrapped.
D. When wrapping a package or object type, only the body should be wrapped, not the specification.
E. To change a wrapped object, the original source code needs to be modified and then wrapped again
F. To change a wrapped object, the wrapped code can be unwrapped, modified In a text file, and then wrapped again.
Answer: D,E,F
Explanation: Reference: http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/wrap.htm#BEHJJHAG
Q10. ORDER_TOTAL is a column in the orders table with the data type and size as number (8, 2) Examine the following code:
Which statement is correct about the above code?
A. It gives an error in line 3
B. It gives an error in line 4
C. It gives an error in line 6
D. It executes successfully and displays the output.
Answer: D