DCL (Data Control Language)

DCL includes commands such as GRANT and REVOKE which mainly deal with the rights, permissions, and other controls of the database system. 

List of  DCL commands:

Two important DCL commands and their syntax are:

Command Description Syntax
GRANT Assigns new privileges to a user account, allowing access to specific database objects, actions, or functions. GRANT privilege_type [(column_list)] ON [object_type] object_name TO user [WITH GRANT OPTION];
REVOKE Removes previously granted privileges from a user account, taking away their access to certain database objects or actions. REVOKE [GRANT OPTION FOR] privilege_type [(column_list)] ON [object_type] object_name FROM user [CASCADE];

SQL Commands | DDL, DQL, DML, DCL and TCL Commands

SQL commands are very used to interact with the database. These commands allow users to perform various actions on a database. This article will teach us about SQL commands or SQL sublanguage commands like DDL, DQL, DML, DCL, and TCL.

All important SQL commands with their syntax and examples are covered in this article.

But before heading to the SQL command section, let’s briefly introduce SQL.

Table of Content

  • Short Overview of SQL
  • DDL (Data Definition Language)
  • DQL (Data Query Language)
  • DML(Data Manipulation Language)
  • DCL (Data Control Language)
  • TCL (Transaction Control Language)
  • Important SQL Commands
  • SQL Commands with Examples

Similar Reads

Short Overview of SQL

Structured Query Language (SQL), as we all know, is the database language by which we can perform certain operations on the existing database, and we can also use this language to create a database. SQL uses certain commands like CREATE, DROP, INSERT, etc. to carry out the required tasks....

DDL (Data Definition Language)

DDL or Data Definition Language actually consists of the SQL commands that can be used to define the database schema. It simply deals with descriptions of the database schema and is used to create and modify the structure of database objects in the database....

DQL (Data Query Language)

DQL statements are used for performing queries on the data within schema objects. The purpose of the DQL Command is to get some schema relation based on the query passed to it. We can define DQL as follows it is a component of SQL statement that allows getting data from the database and imposing order upon it. It includes the SELECT statement....

DML(Data Manipulation Language)

The SQL commands that deal with the manipulation of data present in the database belong to DML or Data Manipulation Language and this includes most of the SQL statements....

DCL (Data Control Language)

DCL includes commands such as GRANT and REVOKE which mainly deal with the rights, permissions, and other controls of the database system....

TCL (Transaction Control Language)

Transactions group a set of tasks into a single execution unit. Each transaction begins with a specific task and ends when all the tasks in the group are successfully completed. If any of the tasks fail, the transaction fails....

Important SQL Commands

Some of the most important SQL commands are:...

SQL Commands With Examples

The examples demonstrates how to use an SQL command. Here is the list of popular SQL commands with Examples....

Conclusion

SQL commands are the foundation of an effective database management system. Whether you are manipulating data, or managing data, SQL provides all sets of tools. Now, with this detailed guide, we hope you have gained a deep understanding of SQL commands, their categories, and syntax with examples....