REVOKE

The REVOKE Statement

REVOKE removes privileges that were granted earlier.

REVOKE privilege_list
ON object_name
FROM user_or_role;

Examples

-- stop the reporting user from reading customers
REVOKE SELECT ON shopdb.Customers FROM 'report_user'@'%';

-- remove write access but keep read access
REVOKE INSERT, UPDATE ON Orders FROM app_user;

-- PostgreSQL: also remove it from anyone it was passed on to
REVOKE SELECT ON Orders FROM analyst CASCADE;

DENY (SQL Server)

SQL Server has a third command, DENY. A DENY always wins over a GRANT, even one the user receives through a role.

DENY DELETE ON Orders TO support_role;