Skip to main content

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 SYSTEM privilege from role role1.

    REVOKE ALTER SYSTEM ON *.* FROM role1;
  • Revoke the SELECT privilege on all objects in database dbtest from role role1.

    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 SELECT privilege on table test1.tbl1 from role role1.

    REVOKE SELECT ON test1.tbl1 FROM role1;
  • Revoke the SELECT privilege on column c1 of table test1.tbl1 from role role1.

    REVOKE SELECT(c1) ON test1.tbl1 FROM role1;

References

For more information about the REVOKE statement, see REVOKE.