Revoke privileges from a role
You can revoke privileges from a role.
Prerequisites
To revoke privileges from a role, the current user must have the privileges to be revoked and the GRANT OPTION privilege. For more information about how to query the privileges of the current user, see View user privileges.
Examples
-
Revoke the
ALTER SYSTEMprivilege from rolerole1.REVOKE ALTER SYSTEM ON *.* FROM role1; -
Revoke the
SELECTprivilege on all objects in databasedbtestfrom rolerole1.REVOKE SELECT ON dbtest.* FROM role1;You can revoke one or more privileges from multiple roles.
REVOKE SELECT,UPDATE ON dbtest.* FROM role1,role2; -
Revoke the
SELECTprivilege on tabletest1.tbl1from rolerole1.REVOKE SELECT ON test1.tbl1 FROM role1; -
Revoke the
SELECTprivilege on columnc1of tabletest1.tbl1from rolerole1.REVOKE SELECT(c1) ON test1.tbl1 FROM role1;
References
For more information about the REVOKE statement, see REVOKE.