For SQL Server 6.5 information, see REVOKE Statement in What's New for SQL Server 6.5.
Revokes object and statement permissions from users.
REVOKE {ALL | statement_list}
FROM {PUBLIC | name_list}
REVOKE {ALL | permission_list}
ON {table_name [(column_list)] | view_name [(column_list)] |
stored_procedure_name | extended_stored_procedure_name}
FROM {PUBLIC | name_list}
where
When permissions are given, information is stored within the sysprotects database table. The sysprotects table manages permissions by updating rows based on each GRANT and REVOKE statement. You can grant or revoke permissions only on objects in the current database.
If permissions are granted to the group public, those permissions will override any previous permissions given to any other user or group of that database. When permissions are given (or revoked), the permissions are order-sensitive. (The statement executed most recently is the one that takes effect.) This can produce undesired results if care is not taken when granting/revoking permissions. For best results, grant/revoke permissions to the least-selective group first (usually public), and then grant/revoke permissions on a group-by-group basis, and then on an individual-by-individual basis, and then to/from the guest user.
The sp_helprotect system stored procedure reports permissions on a database object or on a user. For details, see the sp_helprotect system stored procedure.
This example shows how to revoke multiple statement permissions from multiple users.
REVOKE CREATE TABLE, CREATE DEFAULT FROM Mary, John
GRANT | sp_dropgroup |
SETUSER | sp_dropuser |
sp_addgroup | sp_helpgroup |
sp_adduser | sp_helprotect |
sp_changedbowner | sp_helpuser |
sp_changegroup |