Different Types of SQL Commands

SQL commands can be classified into the following three types:
1. Data Definition Language
2. Data Manipulation Language
3. Data Control Language

Data Definition Language:

It is a part of SQL which consists of those commands that create the objects (tables, indexes, views, etc.) in the databases. Create, Drop and Alter are a few commands of the DDL language.

Data Manipulation Language:

It is part of SQL which consists of a set of commands that determine which values are present in the tables at any given time.

Data Manipulation Language is divided into three categories:

i. Retrieving Data: It means that getting information out of a table. A selection of data items stored in a table is presented on the screen. The command for retrieving data items is SELECT.
ii. Manipulating Data: It refers to the DML features that allow us to perform statistical functions on data.
iii. Updating Data: It refers to inserting and deleting rows in tables and changing values in the columns.

Data Control Language:

It is another portion of SQL which allows the definition of a security mechanism or schema for protecting data from unauthorized access. DCL consists of features that determine whether a user is permitted to perform a particular action. It contains commands like GRANT, REVOKE, etc. These are also known as Transaction Control Commands.