REVOKE (Database)

Revokes the right for the specified user or role to create schemas in the specified database.

Syntax

REVOKE [ GRANT OPTION FOR ] 
... { CREATE | TEMP [ ,... ] }
... | CONNECT
... | ALL [ PRIVILEGES ] }
... ON DATABASE database-name [ , ... ]
... FROM { username | role }[ , ... ]
... [ CASCADE ]

Parameters

GRANT OPTION FOR

Revokes the grant option for the privilege, not the privilege itself. If omitted, revokes both the privilege and the grant option.

CREATE

Revokes the right to create schemas in the specified database.

TEMP

Revokes the right to create temp tables in the database.

ALL

Applies to all privileges.

PRIVILEGES

Is for SQL standard compatibility and is ignored.

database-name

Identifies the database from which to revoke the privilege.

username

Identifies the user from whom to revoke the privilege.

role

Identifies the role from which to revoke the privilege.

CASCADE

Revokes the privilege from the specified user or role and then from others. After a user or role has been granted a privilege, the user can grant that privilege to other users and roles. The CASCADE keyword first revokes the privilege from the initial user or role, and then from other grantees extended the privilege.

Examples

The following example revokes Fred's right to create schemas on vmartdb:

=> REVOKE CREATE ON DATABASE vmartdb FROM Fred;

The following revokes Fred's right to create temporary tables in vmartdb:

=> REVOKE TEMP ON DATABASE vmartdb FROM Fred;