REVOKE <privilege> … FROM SHARE¶
Revokes access privileges for databases and other supported database objects (schemas, tables, and views) from a share. Revoking privileges on these objects effectively removes the objects from the share, disabling access to the objects granted via the database role in all consumer accounts that have created a database from the share.
For more details, see About Secure Data Sharing and Create and configure shares.
Syntax¶
Where:
Parameters¶
nameSpecifies the identifier for the object (database, schema, table, or view) for which the specified privilege is revoked.
schema_nameSpecifies the identifier for the schema for which the specified privilege is revoked for all tables or views.
share_nameSpecifies the identifier for the share for which the specified privilege is revoked.
Usage notes¶
- Each object privilege must be revoked individually from a share, except for tables, Apache Iceberg™ tables, and views.
Using an
ALLclause, you can revoke the SELECT privilege on all tables in the specified schema from a share. You can also revoke the SELECT privilege on all views in a schema from a share if the share has SECURE_OBJECTS_ONLY=FALSE. - If you specify a
TABLEobject that is an Iceberg table, the command revokes the privilege from that Iceberg table.
Examples¶
This example disallows a shared secure view to reference objects from a different database: