You need to give the MANAGER role the ability to select from, insert into, and modify existing rows in the STUDENT_GRADES table. Anyone given this MANAGER role should be able to pass those privileges on to others. Which statement accomplishes this?

  1. GRANT select, insert, update ON student_grades TO manager

  2. GRANT select, insert, update ON student_grades TO ROLE manager

  3. GRANT select, insert, modify ON student_grades TO manager WITH GRANT OPTION;

  4. GRANT select, insert, update ON student_grades TO manager WITH GRANT OPTION;


Correct Option: D
Explanation:

To solve this question, the user needs to understand SQL syntax for granting privileges to a specific role or user.

Now, let's go through each option and explain why it is right or wrong:

A. GRANT select, insert, update ON student_grades TO manager

This option grants SELECT, INSERT, and UPDATE privileges on the STUDENT_GRADES table to a user named "manager". However, it does not grant the ability to pass on these privileges to others.

B. GRANT select, insert, update ON student_grades TO ROLE manager

This option is similar to Option A, but grants privileges to a role named "manager" instead of a specific user. However, it still does not grant the ability to pass on these privileges to others.

C. GRANT select, insert, modify ON student_grades TO manager WITH GRANT OPTION;

This option is incorrect because there is no "MODIFY" privilege in SQL. It should be "UPDATE" instead.

D. GRANT select, insert, update ON student_grades TO manager WITH GRANT OPTION;

This option is correct. It grants SELECT, INSERT, and UPDATE privileges on the STUDENT_GRADES table to a user named "manager" and also includes the "WITH GRANT OPTION" clause, which allows this user to pass on these privileges to others.

Therefore, the correct answer is:

The Answer is: D

Find more quizzes: