百度智能云

All Product Document

          Data Warehouse

          REVOKE

          REVOKE

          Description

          Used to revoke specified privileges of specified user or role.

          Revoke the privileges on libraries and tables:

          REVOKE privilege_list
          ON db_name[.tbl_name]
          FROM user_identity [ROLE role_name]

          Revoke the privileges on resources:

          REVOKE privilege_list
          ON RESOURCE resource_name
          FROM user_identity [ROLE role_name]
          • user_identity

            The user_identity syntax here is the same as the syntax in CREATE USER and must be the user_identity created by using CREATE USER . The host inuser_identity can be a domain name. If it is a domain name, the revoke time of privilege may be delayed for about 1min.

          The privilege of specified ROLE can also be revoked, and the ROLE executed must exist. ​

          Example

          1. Revoke the privilege of user jack on database testDb

            REVOKE SELECT_PRIV ON db1.* FROM 'jack'@'192.%';
          2. Revoke the privilege of user jack on resource odbc_resource

            REVOKE USAGE_PRIV ON RESOURCE 'odbc_resource' FROM 'jack'@'192.%';

          Keywords

          REVOKE
          Previous
          GRANT
          Next
          Auxiliary Commands