Name
REVOKE
Synopsis
The REVOKE
statement
removes permissions for a user, group, or role on a specific database
object or system command.
Vendor |
Command |
---|---|
SQL Server |
Supported, with variations |
MySQL |
Supported, with variations |
Oracle |
Supported, with variations |
PostgreSQL |
Supported, with variations |
SQL99 Syntax and Description
REVOKE [GRANT OPTION FOR] { ALL PRIVILEGES } | SELECT | INSERT | DELETE | UPDATE | REFERENCES | USAGE }[,...n] ON { [TABLE] table_name | DOMAIN domain_name | COLLATION collation_name | CHARACTER SET character_set_name | TRANSLATION translation_name } FROM {grantee_name | PUBLIC} [,...n] {CASCADE | RESTRICT}
A specific privilege on a specific database object can be revoked for
a single user using REVOKE privilege_name ON object_name
FROM grantee_name
. A specific privilege on a specific
object may be revoked from all users via the
PUBLIC
clause. As an alternative, the
WITH GRANT OPTION
can be used to revoke
permissions using the REVOKE GRANT OPTION FOR
clause.
The RESTRICT
option revokes only the specified
privilege. The CASCADE
option revokes the
specified privilege and any privileges that are dependent upon the
granted privilege. A cascading revocation may exhibit different
behavior on different database platforms, so be sure to read the
vendor documentation for the correct implementation of this option.
Microsoft SQL Server Syntax and Variations
REVOKE [GRANT OPTION FOR] {ALL [ PRIVILEGES ] | SELECT | INSERT | DELETE | UPDATE | REFERENCES | EXECUTE | CREATE ...
Get SQL in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.