Removes permissions for specified user(s).
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 [ ( column-name [, ...] ) ] | UPDATE [ ( column-name,... ) ] } ... ON [ owner.]table-name FROM userid [, ...]
Syntax 3
REVOKE EXECUTE ON [ owner.]procedure-name FROM userid [, ...]
Prevent user dave from inserting into the employee table.
REVOKE INSERT ON employee FROM dave ;
Revoke resource permissions from user Jim.
REVOKE RESOURCE FROM Jim ;
Prevent user dave from updating the employee table.
REVOKE UPDATE ON employee FROM dave ;
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 ;
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.
You cannot revoke a user’s connect privileges if that user owns database objects, such as tables. Attempting to do so with a REVOKE statement or sp_dropuser procedure returns an error like “Cannot drop a user that owns tables in runtime system.”
Automatic commit.
SQL/92 Syntax 1 is a vendor extension. Syntax 2 is an entry-level feature. Syntax 3 is a Persistent stored module feature.
Sybase Syntax 2 and 3 are supported by Adaptive Server Enterprise. Syntax 1 is not supported by Adaptive Server Enterprise. User management and security models are different for Sybase IQ and Adaptive Server Enterprise.
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.