Quiz 12
Quiz 12
(1) Points
SELECT ..... FOR UPDATE NOWAIT
GRANT (*)
SAVEPOINT
ALTER (*)
DELETE
Correct
(1) Points
All views in the user's schema will be dropped. (*)
The procedure will raise an exception because one of the views is a complex
view.
The procedure will raise an exception because Dynamic SQL can drop tables
but cannot drop views.
The procedure will not compile successfully because the syntax of EXECUTE
IMMEDIATE is incorrect.
Correct
(1) Points
True
False (*)
Correct
4. A programmer wants to code a procedure which will create a table with a
single column. The datatype of the column will be chosen by the user who
invokes the procedure. The programmer writes the following code:
CREATE OR REPLACE PROCEDURE create_tab
(p_col_datatype IN VARCHAR2) IS
BEGIN
CREATE TABLE newtab (only_col p_col_datatype);
END;
(1) Points
Because you cannot create a table inside a procedure
Because the invoking user may not have CREATE TABLE privilege
Because when the procedure is compiled, Oracle cannot check if the
parameter value passed into the procedure is a valid column datatype (*)
Because table NEWTAB may already exist
None of the above; the procedure will compile successfully.
Correct
(1) Points
True (*)
False
Correct
6. What happens when a SQL statement is parsed? (Choose three.)
Mark for Review
(1) Points
The statement is executed.
The user's required privileges are checked. (*)
Oracle queries the Data Dictionary to make sure that the tables referenced
in the SQL statement exist. (*)
The results of the statement are returned to the user.
The syntax of the statement is checked. (*)
Correct
(1) Points
When the package is loaded into memory
When the package specification is created
When the package header is loaded into memory
When the package body is created (*)
Only the first time the procedure is executed
Correct
(1) Points
True
False (*)
Correct
(1) Points
Improve performance by making one call to the SQL engine (*)
Improve performance by returning a single value
Return more readily any exceptions that are raised by the statement
Improve performance by minimizing the number of statements
Correct
10. FORALL can only be used with the INSERT statement. True or False?
Mark for Review
(1) Points
True
False (*)
Correct
Previous
11. In the following example, where do you place the phrase BULK
COLLECT?
...
BEGIN
SELECT -- Position A
salary -- Position B
INTO v_saltab -- Position C
FROM employees WHERE department_id = 20 ORDER BY salary
-- Position D
;
...
(1) Points
Position A
Position B (*)
Position C
Position D
Correct
12. Where would you place the BULK COLLECT statement in the following
example?
DECLARE
TYPE DeptRecTab IS TABLE OF departments%ROWTYPE;
dept_recs DeptRecTab;
CURSOR c1 IS
SELECT department_id, department_name, manager_id, location_id
-- Position A
FROM departments
WHERE department_id > 70;
BEGIN
OPEN c1
-- Position B;
FETCH c1
-- Position C
INTO dept_recs;
END;
(1) Points
Position A
Position B
Position C (*)
Correct
(1) Points
True (*)
False
Correct
(1) Points
Position A
Position B (*)
Position C
Correct
(1) Points
FORALL does not require END LOOP. (*)
v_emptab is incorrectly typed.
The phrase should be FOR ALL.
Nothing is wrong; it will compile successfully.
Correct
Previous