The DCL control statement is used to set permissions for changing users or roles.
- Grant Permission Action--grant
The SQL Server server controls user access to the database through the Sign Language permission table. After adding a new user to the database, if you do not enjoy the extra action, the user only chauxn the system tables and does not have any permissions to manipulate the database objects. The GRANT statement can grant permission to manipulate database objects, including tables, views, stored procedures, aggregate functions, and so on. The permissions allowed to execute include: query, update, delete, etc.
Example: authorizing a user named guest to perform update and delete operations on the Stu_info table
GRANT Update,delete on Stu_info
To guest with GRANT OPTION
Note: With GRANT option means that the user can also grant other users the permissions they own.
- Deny permission action--deny
Example: Prohibit user named guest to update permissions on Stu_info table operations
DENY UPDATE on Stu_info to guest CASCADE
- Revoke permissions Operation--revoke
Example: Recovering a Guest user's delete permission to Stu_info
REVOKE DELETE on Stu_info from guest
SQL Server Data Control statement (DCL)