sql / beginner
Snippet
Removing Direct Table Modification Rights with REVOKE
The REVOKE command removes specific database permissions from users or roles, enforcing the principle of least privilege for security compliance.
snippet.sql
sql
1
REVOKE UPDATE, DELETE ON audit_logs FROM analyst_role;
Breakdown
1
REVOKE UPDATE, DELETE
Specifies the write modification permissions being withdrawn.
2
ON audit_logs
Identifies the target database table audit_logs.
3
FROM analyst_role;
Designates the role losing these specific table permissions.