Administrations
Administrations
Roles and Privileges
🟢 Basic Questions
- What is a role in PostgreSQL?
- What is the benefit of using group roles?
- Differentiate between
- What is the purpose of the GRANT command in PostgreSQL?
- What is the purpose of the REVOKE command in PostgreSQL?
- What is the difference between GRANT and REVOKE?
- What does GRANT SELECT ON table TO role do?
🟡 Conceptual Questions
- What does WITH GRANT OPTION mean?
- Write a SQL command to give SELECT permission on table students to role teacher.
🔵 SQL Practice Questions
- Write a command to give all privileges on a table to a role admin_role.
- How do you grant CONNECT privilege on a database to a role?
🔴 Scenario-Based Questions
- In a university system, how will you give teachers permission to view and update student records?
- Why is it dangerous to use GRANT ALL PRIVILEGES in production systems?