Revoke On SQL


REVOKE: This command has reversed with GRANT usability, ie to remove the permissions that have been granted to the user by the administrator or revoke the rights of a user to a particular database or part of the contents of the database.

Revoke Public syntax:

REVOKE <field> ON [table] FROM <expression>

Removing restrictions & permissions For database tables:

REVOKE <field> ON [database].[Table] FROM user

Removing restrictions permissions for specific columns:

REVOKE access (field1, field2, field3, ...) ON [database].[Table] FROM user

- Permissions (field): we must provide at least one permissions. For all permissions granted, may also be given a list of fields that are put in parentheses, and separated by commas. Example: REVOKE select (num, name), update, insert (num), ...
- Table name: the name of the table that the permissions are known, there must be at least one table name. And can use the symbol asterisk (*) to represent all the tables in the active database. NamaTabel writing can also be followed by the database name followed by the table name separated by a dot. Using the symbol *. * Means all tables and all the tables are subject to these permissions.

Comments