Oracle Database SQL (1Z0-071) Practice Questions

Oracle Database SQL (1Z0-071) exam preparation

Oracle Database SQL (1Z0-071) practice questions in English: 180 questions with explanations. The mock exam has 78 questions and 120 minutes.

Oracle Database SQL (1Z0-071) free question 4 / 10 · Domain 14: Controlling User Access

scott was granted a privilege by hr as follows. Which of the following can scott do? GRANT SELECT ON hr.employees TO scott WITH GRANT OPTION;

  1. Grant the SELECT privilege on hr.employees to king
  2. Grant system privileges to king
  3. Grant the UPDATE privilege on hr.employees to king
  4. Drop the table as the user that owns hr.employees
Show the answer and explanation

Answer: A

Why this is correct
"GRANT" in the SQL Language Reference says that a user who has been granted an object privilege by the owner of the object with the WITH GRANT OPTION can grant that object privilege to other users. What scott can grant is the SELECT privilege he received.

Why the other options are wrong
"Grant system privileges to king" … WITH GRANT OPTION is an option on object privileges. WITH ADMIN OPTION is what is used to delegate system privileges and roles.
"Grant the UPDATE privilege on hr.employees to king" … scott holds only the SELECT privilege and has not been granted UPDATE. What scott can grant is the privilege received with WITH GRANT OPTION.
"Drop the table as the user that owns hr.employees" … WITH GRANT OPTION lets a user grant a privilege to others. It does not transfer ownership of the table, and it does not include the right to drop it.

Key takeaway
WITH GRANT OPTION lets the grantee pass on an object privilege that was received. Passing on system privileges and roles is WITH ADMIN OPTION. Trace the example: hr owns the table and grants SELECT to scott with the grant option, so scott can pass exactly that privilege on to king. scott cannot raise it to UPDATE or hand out privileges he was never given. The GRANT page defines WITH GRANT OPTION as enabling the grantee to grant the object privileges to other users and roles, and it adds that the option can be specified only when granting to a user or to PUBLIC, not when granting to a role.

Go to the Oracle Database SQL (1Z0-071) practice app (10 free questions; purchase unlocks all questions)

See the full practice set