Roles and privileges are central to SQL security and access control, allowing database administrators to manage user access efficiently. Roles group multiple privileges that can be assigned collectively to users.
Time limit: 0
Quiz Summary
0 of 15 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Which command is used to remove a role from a user?
Correct
Incorrect
Question 6 of 15
6. Question
What does the SET ROLE command do in SQL?
Correct
Incorrect
Question 7 of 15
7. Question
What does the following command do?
REVOKE SELECT ON employees FROM manager_role;
Correct
Incorrect
Question 8 of 15
8. Question
Which of the following can be assigned to a role?
Correct
Incorrect
Question 9 of 15
9. Question
What keyword allows a user to further grant privileges they received via a role?
Correct
Incorrect
Question 10 of 15
10. Question
Can a role be granted to another role?
Correct
Incorrect
Question 11 of 15
11. Question
What is the default behavior when a role is granted to a user?
Correct
Incorrect
Question 12 of 15
12. Question
What does the command DROP ROLE auditor; do?
Correct
Incorrect
Question 13 of 15
13. Question
Which of these is a system privilege in SQL?
Correct
Incorrect
Question 14 of 15
14. Question
Why are roles preferred over granting privileges directly to users?
Correct
Incorrect
Question 15 of 15
15. Question
What happens if you revoke a role that was the only source of a user’s privileges?
Correct
Incorrect
Summary
This quiz on SQL roles and privileges covers the creation, assignment, and revocation of roles and privileges in SQL, along with best practices and key commands like GRANT, REVOKE, CREATE ROLE, and SET ROLE.
At QuizOrbit, our team specializes in fun, informative quizzes across topics like general knowledge, technology, and entertainment. Boost your knowledge with our expert-designed quizzes.