REVOKE
The REVOKE statement removes authorization allowed by a GRANT
statement. The syntax of the REVOKE statement is:
REVOKE operation-list ON tablename FROM user-list
- operation-list
- Lists one or more of the following, separated by commas: ALTER, DELETE,
INSERT, SELECT, UPDATE, or ALL to revoke authorization to do any
operations.
- tablename
- Names the table or view for which the authorization is revoked.
- user-list
- Lists each user ID with commas between. PUBLIC can be specified
in place of user-list. The use of PUBLIC does not revoke
a privilege from any user ID for which authorization was specifically
granted; such a privilege must also be specifically revoked.
REVOKE and GRANT are similar, with the following exceptions:
- With REVOKE, you cannot specify a column list after UPDATE.
UPDATE revokes the authorization to update any column. To revoke
authorization to update specific columns and allow it to remain
for others:
- Revoke the authorization to update any column.
- Grant the authorization to update a specific list of columns.
- If you grant an authorization to JONES who grants it to JACOBS,
and you revoke the authorization from JONES, authorization is also
revoked from JACOBS.
The following statement revokes authorization to write SELECT
queries using table PERS from user Jacobs:
REVOKE SELECT ON PERS FROM JACOBS
The following statement revokes authorization to update any column
in PERS from user HSAM4419:
REVOKE UPDATE ON PERS FROM HSAM4419
