QuestionQ161

VerifiedControlling User Access

Examine the following statements:

CREATE ROLE registrar;  
GRANT UPDATE ON student_grades TO registrar;  
GRANT registrar to user1, user2, user3;  

What does this SQL statement set do?

Explanation

CREATE ROLE defines the REGISTRAR role. GRANT UPDATE ON student_grades TO registrar assigns that role the UPDATE privilege on STUDENT_GRADES, and GRANT registrar TO user1, user2, user3 makes the three specified existing users members of that role.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!