DB2 10.5 for Linux, UNIX, and Windows

REVOKE (sequence privileges)

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

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. However, if the bind option DYNAMICRULES BIND applies, the statement cannot be dynamically prepared (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----+-ALTER-+-+--ON SEQUENCE--sequence-name------------>
             '-USAGE-'                                 

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

Description

ALTER
Revokes the privilege to change the properties of a sequence or to restart sequence number generation using the ALTER SEQUENCE statement.
USAGE
Revokes the privilege to reference a sequence using nextval-expression or prevval-expression.
ON SEQUENCE sequence-name
Identifies the sequence on which the specified privileges are to be revoked. The sequence name, including an implicit or explicit schema qualifier, must uniquely identify an existing sequence at the current server. If no sequence by this name exists, an error is returned (SQLSTATE 42704).
FROM
Specifies 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 specified privileges from PUBLIC.
BY ALL
Revokes each specified privilege from all named users who were explicitly granted those privileges, regardless of who granted them. This is the default behavior.
RESTRICT
This optional keyword indicates that the statement will fail if any objects depend on the privilege being revoked.

Rules

Notes

Examples