REVOKE

REVOKE — remove access privileges from users and/or roles.

Syntax

REVOKE rolename [, ...] FROM username
           
REVOKE { ALTER | EXECUTE } ON PROCEDURE procname FROM { [USER] user | ROLE rolename } [, ...]

REVOKE { ALTER | EXECUTE } ON FUNCTION funcname[/argcount] FROM { [USER] user | ROLE rolename }  [, ...]
 
REVOKE{ CREATE | ALTER } ON SCHEMA schemaname FROM { [USER] user | ROLE rolename }  [, ...]

REVOKE privilege ON object FROM [ USER ] user | ROLE rolename }  [, ...]

	where user is:
		username |PUBLIC 
 
	where privilege is:
		SELECT|INSERT|UPDATE|DELETE|ALTER|GRANT|TRIGGER | {ALL[PRIVILEGES]}

	and object is:
		ALL TABLES IN SCHEMA schemaname|
		[TABLE]tablename|
		VIEW viewname|     
		ALL SEQUENCES IN SCHEMA schemaname|
		SEQUENCE sequencename
		USER username

Description

Removes access privileges. Use the REVOKE statement to:

The REVOKE ALL ON ALL TABLES statement removes privileges on the tables in a schema but not on the schema itself.
To remove a user's privilege to create tables, views, SQL domain types and sequences in a schema, use the REVOKE CREATE ON SCHEMA statement. To remove a user's privilege to drop a schema, use the REVOKE ALTER ON SCHEMA statement.

Parameters

Examples