The GRANT and REVOKE statements in SQL are essential for managing user permissions and access control in relational databases. They help database administrators ensure secure and rule-based operations.
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 SQL keyword is used to remove privileges from a user?
Correct
Incorrect
Question 3 of 15
3. Question
Which of the following is a valid privilege in SQL
Correct
Incorrect
Question 4 of 15
4. Question
What will the following statement do?
GRANT SELECT, INSERT ON employees TO john;
Correct
Incorrect
Question 5 of 15
5. Question
Which clause is used with GRANT to allow the recipient to further grant permissions to others?
Correct
Incorrect
Question 6 of 15
6. Question
What does this command do?
REVOKE DELETE ON students FROM alice;
Correct
Incorrect
Question 7 of 15
7. Question
If a user grants a privilege with WITH GRANT OPTION, and their privilege is revoked, what happens?
Correct
Incorrect
Question 8 of 15
8. Question
Which of these privileges allows a user to remove rows from a table?
Correct
Incorrect
Question 9 of 15
9. Question
What is the default state of user privileges in most RDBMS systems?
Correct
Incorrect
Question 10 of 15
10. Question
Can GRANT and REVOKE be used on views as well as tables?
Correct
Incorrect
Question 11 of 15
11. Question
What is the role of the PUBLIC keyword in GRANT/REVOKE statements?
Correct
Incorrect
Question 12 of 15
12. Question
How can a DBA check which privileges a user currently has?
Correct
Incorrect
Question 13 of 15
13. Question
What happens if a user tries to access a table without permission?
Correct
Incorrect
Question 14 of 15
14. Question
Which of the following cannot be granted using GRANT?
Correct
Incorrect
Question 15 of 15
15. Question
Which user typically has the authority to issue GRANT and REVOKE commands?
Correct
Incorrect
Summary
This quiz on SQL grant and revoke explores the usage, syntax, and best practices of GRANT and REVOKE commands in SQL, ensuring learners understand how to control privileges like SELECT, INSERT, DELETE, and more across users and roles.
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.