Beruflich Dokumente
Kultur Dokumente
User DIANE owns a DEPARTMENTS table. User JOEL needs to update the
location_id column of Diane's table, but no other columns. Which SQL
statement should Diane execute to allow this?
Mark for Review
(1) Points
GRANT UPDATE ON departments.location_id TO joel;
GRANT UPDATE ON departments(location_id) TO joel;
GRANT UPDATE ON departments TO joel;
GRANT UPDATE ON location_id OF departments TO joel;
GRANT UPDATE(location_id) ON departments TO joel; (*)
Correct
2. You granted user JOE the privilege to query the EMPLOYEES table in your
schema. Now, you want to remove this privilege from JOE. Which command
would you use?
Mark for Review
(1) Points
DENY SELECT ON employees TO joe;
ROLLBACK;
GRANT UNSELECT ON employees TO joe;
UNGRANT SELECT ON employees TO joe;
REVOKE SELECT ON employees FROM joe; (*)
Correct
4. A function named MYFUNC has been created. This function accepts one IN
parameter of datatype VARCHAR2 and returns a NUMBER.
You want to invoke the function within the following anonymous block:
DECLARE
v_var1 NUMBER(6,2);
BEGIN
-- Line A
END;
What could be coded at Liine A?
(1) Points
myfunc('Crocodile', v_var1);
v_var1 := myfunc('Crocodile'); (*)
myfunc(v_var1, 'Crocodile');
myfunc(v_var1) := 'Crocodile';
myfunc('Crocodile') := v_var1;
Correct
(1) Points
An error message will be displayed because you cannot nest user-defined
functions.
11
23
17 (*)
66
Correct
6. You want to see the names, modes, and data types of the formal
parameters of function MY_FUNC in your schema. How can you do this?
(Choose two)
Mark for Review
(1) Points
Query USER_SOURCE (*)
SHOW PARAMETER my_func;
DESCRIBE my_func; (*)
Query USER_PARAMETERS
Query USER_FUNCTIONS
Correct
7. Which view would you query to see the detailed code of a procedure?
Mark for Review
(1) Points
user_objects
user_dependencies
user_errors
user_source (*)
user_procedures
Correct
(1) Points
To provide a list of all objects in your schema, but not in other users'
schemas
To ensure correct spelling of the values in VARCHAR2 table columns
To translate data from one language to another
To prevent users from accidentally dropping tables
To provide a structured list of all objects in the database (*)
Correct
(1) Points
All of these. (*)
It lists all the dictionary views.
It can be thought of as a "catalog of the master catalog".
None of these.
We can use it like a Web search engine to remind ourselves of the names of
dictionary views.
Correct
10. You want to find out how many Dictionary views will list objects in your
schema (but not in other users' schemas). Which of the following queries
should you use to do this?
Mark for Review
(1) Points
SELECT COUNT(*)
FROM USER_DICTIONARY;
SELECT COUNT(*)
FROM DBA_OBJECTS
WHERE OWNER='USER';
SELECT COUNT(*)
FROM DICTIONARY
WHERE TABLE_NAME NOT LIKE 'DBA%';
SELECT COUNT(*)
FROM DICTIONARY;
SELECT COUNT(*)
FROM DICTIONARY
WHERE TABLE_NAME LIKE 'USER%'; (*)
Correct
Previous
11. Which statement is true regarding the following subprogram?
PROCEDURE at_proc IS
PRAGMA AUTONOMOUS_TRANSACTION;
dept_id NUMBER := 90;
BEGIN
UPDATE ...
INSERT ...
END at_proc;
(1) Points
The subprogram's success is independent of the calling program. (*)
The subprogram cannot do a COMMIT.
The subprogram's success depends on the calling program.
The subprogram will fail because the RETURN is not specified.
Correct
(1) Points
ALTER PROCEDURE myproca TO INVOKER;
GRANT INVOKER TO myprocA;
CREATE OR REPLACE PROCEDURE myproca
AUTHID OWNER IS...
CREATE OR REPLACE PROCEDURE myproca
AUTHID CURRENT_USER IS... (*)
Invoker's Rights are the default, therefore no extra code is needed.
Correct
(1) Points
COMMIT;
One or more IN parameters (*)
RETURN BOOLEAN
An OUT parameter
Correct
(1) Points
SELECT upd_dept(80)
FROM dual;
DELETE FROM employees
WHERE department_id = upd_dept(80); (*)
SELECT upd_dept(department_id)
FROM employees;
DELETE FROM departments
WHERE department_id = upd_dept(department_id);
Correct
(1) Points
True (*)
False
Correct
Previous