Contents IndexRETURN statement REVOKE CONSOLIDATE statement

User's Guide
   Part VI. SQL Anywhere Reference
     Chapter 43. Watcom-SQL Statements
      REVOKE statement

Function

To remove permissions for specified user(s).

Syntax

     Syntax 1

     REVOKE
          {     CONNECT
              | DBA
              | INTEGRATED LOGIN
              | GROUP
              | MEMBERSHIP IN GROUP userid,...
              | RESOURCE
          }

     ... FROM userid,...

     Syntax 2

     REVOKE
          {     ALL [PRIVILEGES]
              | ALTER
              | DELETE
              | INSERT
              | REFERENCE ,...
              | SELECT
              | UPDATE [(column-name,...)]
          }

     ... ON [ owner.]table-name FROM userid,...

     Syntax 3

     REVOKE EXECUTE ON [ owner.]procedure-name FROM userid,...

Usage

Anywhere.

Permissions

Must be the grantor of the permissions that are being revoked or must have DBA authority.

If revoking CONNECT permissions or revoking table permissions from another user, the other user must not be connected to the database.

Side effects

Automatic commit.

See also

Description

The REVOKE statement is used to remove permissions that were given using the GRANT statement. Form 1 is used to revoke special user permissions and Form 2 is used to revoke table permissions. Form 3 is used to revoke permission to execute a procedure. REVOKE CONNECT is used to remove a user ID from a database. REVOKE GROUP will automatically REVOKE MEMBERSHIP from all members of the group.

Examples

Prevent user Dave from updating the employee table.

     REVOKE UPDATE ON employee FROM dave ;

Revoke resource permissions from user Jim.

     REVOKE RESOURCE FROM Jim ;

Revoke integrated login mapping from user profile name Administrator

     REVOKE INTEGRATED LOGIN FROM Administrator ;

Disallow the Finance group from executing the procedure sp_customer_list.

     REVOKE EXECUTE ON sp_customer_list
     FROM finance ;

Drop user ID FranW from the database.

     REVOKE CONNECT FROM FranW

Contents IndexRETURN statement REVOKE CONSOLIDATE statement