The REVOKE statement removes permissions given using the GRANT statement. Syntax 1 revokes special user permissions. Syntax
2 revokes table permissions. Syntax 3 revokes permission to execute a procedure. Syntax 4 revokes sequence permissions.
REVOKE CONNECT removes a user ID from a database, and also destroys any objects (tables, views, procedures, and so on) owned
by that user and any permissions granted by that user. You cannot execute a REVOKE CONNECT on a user if the user being dropped
owns a table referenced by a view owned by another user.
REVOKE GROUP automatically revokes MEMBERSHIP IN GROUP from all members of the group.
When you add a user to a group, the user inherits all the permissions assigned to that group. SQL Anywhere does not allow
you to revoke a subset of the permissions that a user inherits as a member of a group because you can only revoke permissions
that are explicitly given by a GRANT statement. If you need to have different permissions for different users, you can create
different groups with the appropriate permissions, or you can explicitly grant each user the permissions they require.
When you grant or revoke group permissions for tables, views, or procedures, all members of the group inherit those changes.
The DBA, RESOURCE, and GROUP permissions are not inherited: you must assign them to each individual user ID that requires
If you revoke a permission for a user and they also had WITH GRANT OPTION for that permission, then everyone who that user
granted the permission to also has their permission revoked. For example, suppose you granted UserA SELECT...WITH GRANT OPTION
permissions on a table and UserA then grants the SELECT permission on the table to UserB. If you revoke the SELECT permission
from UserA, it will be revoked for UserB as well.
REVOKE USAGE ON SEQUENCE removes a user's permission to evaluate the current or next value in a sequence. You must have DBA
authority or be the creator of the sequence to execute this statement.
Must be the grantor of the permissions that are being revoked or have DBA authority.
If you are revoking connect permissions or table permissions from another user, the other user must not be connected to the
database. You cannot revoke connect permissions from DBO.
When you are connected to the utility database, executing REVOKE CONNECT FROM DBA disables future connections to the utility
database. This means that no future connections can be made to the utility database unless you use a connection that existed
before the REVOKE CONNECT was done, or restart the database server.
Syntax 1 is a vendor extension. Syntax 2 and Syntax 3 are core features of the SQL/2008 standard. With Syntax 2, in SQL
Anywhere the PRIVILEGES keyword is optional, while in the SQL/2008 standard "ALL PRIVILEGES" is mandatory.
Syntax 4 is part of optional SQL/2008 language feature T176, "Sequence generator support".