- Common users can only revoke their privileges that have the
WITH GRANT OPTIONkeyword from other users and roles. For information aboutWITH GRANT OPTION, see GRANT. - Only users with the
user_adminrole has the privilege to revoke privileges from other users.
Syntax
Revoke privileges
The privileges that can be revoked are object-specific. The following part describes syntax based on objects.System
AI functions and providers
Resource group
Resource
User
Global UDF
Internal catalog
External catalog
Database
- You must first run SET CATALOG before you run this command.
Table
- You must first run SET CATALOG before you run this command.
-
You can also use db.tbl to represent a table.
View
- You must first run SET CATALOG before you run this command.
- You can also use db.view to represent a view.
-
For the EXPORT privilege, only grant and revoke are supported. Exporting the view via
EXPORT TABLEis not supported.
Materialized view
- You must first run SET CATALOG before you run this command.
- You can also use db.mv to represent an mv.
-
For the EXPORT privilege, only grant and revoke are supported. Exporting the materialized view via
EXPORT TABLEis not supported.
Function
- You must first run SET CATALOG before you run this command.
-
You can also use db.function to represent a function.
Storage volume
Revoke roles
Parameters
Examples
Revoke privileges
Revoke the SELECT privilege on tablesr_member from user jack:
spark_resource from role test_role:
Revoke roles
Revoke the roleexample_role from user jack:
example_role from role test_role: