The full form of DCL is Data Control Language. It is a syntax component of SQL (Structured Query Language), applied in (the RDBMS) Relational Database Management System for accessing data stored in a database, executing operations like creating a table, and managing the data. In other words, DCL commands are used to perform work related to a database’s rights, permission, and other management controls. Apart from DCL, SQL has DDL (Data Definition Language), DQL (Data Query Language), DML (Data Manipulation Language), and DCL (Data Control Language) as the most common classifications for SQL instructions (Data Control Language).
Data control Language provides access to the stored data, primarily for Revoke and Deny, and Grants the user database access. It is the easiest of the four command languages DDL, DQL, DML, and DCL. The main motive for using DCL is to provide certain privileges by the administrator to the user like whether he or she can change or manipulate certain parts of data. As said, DCL provides security controls for a database.
The Data control language commands are -
This command is used by the administrator to grant permission to the user to perform operations on a particular subject. The administrator using this can also limit the accessibility of the user as one who only watches the data or who may upload or manipulate the data.
Syntax:
Grant privilege_list
On object_name
To user_name;
The revoke command is used to take back the permission or access of the database granted to the user, making it unable to perform any further operations on the data inside the database.
Syntax:
Revoke privilege_list
On object_name
From User_name;
Following other commands are granted to the user as in the privilege list: