This topic describes how to revoke privileges from a role.
Prerequisites
You have the privileges to be revoked and the GRANT OPTION privilege. For information about how to view your privileges, see View user privileges.
Examples
Revoke the
ALTER SYSTEMprivilege from therole1role.obclient [oceanbase]> REVOKE ALTER SYSTEM ON *.* FROM role1;Revoke the
SELECTprivilege on all objects in thedbtestdatabase from therole1role.obclient [oceanbase]> REVOKE SELECT ON dbtest.* FROM role1;Revoke multiple privileges from multiple roles at a time.
obclient [oceanbase]> REVOKE SELECT,UPDATE ON dbtest.* FROM role1,role2;Revoke the
SELECTprivilege on thetest1.tbl1table from therole1role.obclient [oceanbase]> REVOKE SELECT ON test1.tbl1 FROM role1;Revoke the
SELECTprivilege on thec1column of thetest1.tbl1table from therole1role.obclient [oceanbase]> REVOKE SELECT(c1) ON test1.tbl1 FROM role1;
References
For more information about the REVOKE statement, see REVOKE.