DB2 10.5 for Linux, UNIX, and Windows

REVOKE (schema privileges) statement

This form of the REVOKE statement revokes the privileges on a schema.

Invocation

This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared only if DYNAMICRULES run behavior is in effect for the package (SQLSTATE 42509).

Authorization

The privileges held by the authorization ID of the statement must include ACCESSCTRL or SECADM authority.

Syntax

Read syntax diagramSkip visual syntax diagram
           .-,------------.                           
           V              |                           
>>-REVOKE----+-ALTERIN--+-+--ON SCHEMA--schema-name------------->
             +-CREATEIN-+                             
             '-DROPIN---'                             

         .-,---------------------------------.               
         V                                   |  .-BY ALL-.   
>--FROM----+-+-------+--authorization-name-+-+--+--------+-----><
           | +-USER--+                     |                 
           | +-GROUP-+                     |                 
           | '-ROLE--'                     |                 
           '-PUBLIC------------------------'                 

Description

ALTERIN
Revokes the privilege to alter or comment on objects in the schema.
CREATEIN
Revokes the privilege to create objects in the schema.
DROPIN
Revokes the privilege to drop objects in the schema.
ON SCHEMA schema-name
Specifies the name of the schema on which privileges are to be revoked.
FROM
Indicates from whom the privileges are revoked.
USER
Specifies that the authorization-name identifies a user.
GROUP
Specifies that the authorization-name identifies a group name.
ROLE
Specifies that the authorization-name identifies a role name.
authorization-name,...
Lists the authorization IDs of one or more users, groups, or roles.

The list of authorization IDs cannot include the authorization ID of the user issuing the statement (SQLSTATE 42502).

PUBLIC
Revokes the privileges from PUBLIC.
BY ALL
Revokes each named privilege from all named users who were explicitly granted those privileges, regardless of who granted them. This is the default behavior.

Rules

Notes

Examples