REVOKE (table)
Revokes table privileges from users and roles.
Syntax
REVOKE [ GRANT OPTION FOR ] { privilege[,...] | ALL [ PRIVILEGES ] }
ON {
[ TABLE ] [[{namespace. | database. }]schema.]table[,...]
| ALL TABLES IN SCHEMA [database.]schema[,...] }
FROM grantee[,...]
[ CASCADE ]
Parameters
GRANT OPTION FORRevokes the grant option for the specified privileges. Current privileges for grantees remain unaffected. If you omit this clause, OpenText™ Analytics Database revokes both the grant option and current privileges.
privilege- One of the following privileges:
-
SELECT: Query tables. SELECT privileges are granted by default to the PUBLIC role.
-
INSERT: Insert table rows with INSERT, and load data with
COPY.Note
COPY FROM STDINis allowed for users with INSERT privileges, whileCOPY FROMfilerequires admin privileges. -
UPDATE: Update table rows.
-
DELETE: Delete table rows.
-
REFERENCES: Create foreign key constraints on this table. This privilege must be set on both referencing and referenced tables.
-
TRUNCATE: Truncate table contents. Non-owners of tables can also execute the following partition operations on them:
-
ALTER: Modify a table's DDL with
ALTER TABLE. -
DROP: Drop a table.
-
ALL [PRIVILEGES]- Revokes all table privileges that also belong to the revoker. Users cannot revoke privileges that they themselves lack.
The optional keyword
PRIVILEGESis supported to comply with the SQL standard.
{database|namespace}- Name of the database or namespace that contains
table:-
Database name: If specified, it must be the current database.
-
Namespace name (Eon Mode only): You must specify the namespace of objects in non-default namespaces. If no namespace is provided, it is assumed the object is in the default namespace.
-
schema- Name of the schema, by default
public. If you specify the namespace or database name, you must provide the schema name, even if the schema ispublic.If you specify a schema name that contains a period, the part before the period cannot be the same as the name of an existing namespace.
TABLEtable- Specifies the table on which to revoke privileges.
ON ALL TABLES IN SCHEMAschema- Revokes the specified privileges on all tables and views in schema
schema. granteeWhose privileges are revoked, one of the following:
CASCADERevoke privileges from users who received them from the grantee through
WITH GRANT OPTION.
Privileges
Non-superuser, one of the following:
-
Ownership
-
GRANT OPTION on the object
Examples
Revoke user Joe's privileges on table customer_dimension.
=> REVOKE ALL PRIVILEGES ON TABLE customer_dimension FROM Joe;
REVOKE PRIVILEGE