REVOKE FROM SHARE Statement
Description
The REVOKE FROM SHARE
statement is used to revoke the permissions of a shared table or view. By executing this statement, you can revoke other users or roles' access to the shared object.
Syntax Format
Parameter Description
PERMISSIONS
: Specifies the permissions to be revoked. Optional values areselect
(for querying data) andread metadata
(for viewing the metadata of a table or view).TABLE table_name
: Specifies the name of the table for which the permissions are to be revoked.VIEW view_name
: Specifies the name of the view for which the permissions are to be revoked.share_name
: Specifies the name of the share to be operated on.
Example
- Revoke a user's query permission and metadata viewing permission on a shared table:
- Revoking a user's metadata viewing permissions for the shared table, but retaining query permissions:
Notes
- Before executing the
REVOKE FROM SHARE
statement, please ensure that you have sufficient permissions to revoke the permissions of the shared object. - Users or roles whose permissions have been revoked will no longer be able to access the specified tables or views.
- If you need to re-grant permissions, you can use the
GRANT
statement.
With the above content, you can better understand and use the REVOKE FROM SHARE
statement to manage the permissions of shared objects.