SQL Categorizes its commands on the basis of functionalities performed by them. There are five types of SQL Commands which can be classified as:
DDL(Data Definition Language).
DML(Data Manipulation Language).
DQL(Data Query Language).
DCL(Data Control Language).
TCL(Transaction Control Language).
Types Of SQL Commands : Data Definition Language(DDL)
In order to make/perform changes on the physical structure of any table residing inside a database, DDL is used. These commands when executed are auto commit in nature and all the changes in the table are reflected and saved immediately. DDL commands includes :
SQL DDL Commands
Types Of SQL Commands : Data Manipulation Language(DML)
Once the tables are created and database is generated using DDL commands, manipulation inside those tables and databases is done using DML commands. The advantage of using DML commands is, if in case any wrong changes or values are made, they can be changes and rolled back easily. DML commands includes :
SQL DML Commands
Types Of SQL Commands : Data Control Language(DCL)
DCL commands as the name suggests manages the matters and issues related to the data control in any database. TCL commands mainly provides special privilege access to users and is also used to specify the roles of users accordingly. There are two commonly used DCL commands, these are:
SQL DCL Commands
Types Of SQL Commands : Data Query Language(DQL)
Data query language consists of only one command over which data selection in SQL relies. SELECT command in combination with other SQL clauses is used to retrieve and fetch data from database/tables on the basis of certain conditions applied by user.
SQL DQL Command
Types Of SQL Commands : Transaction Control Language(TCL)
Transaction Control Language as the name suggests manages the issues and matters related to the transactions in any database. They are used to rollback or commit the changes in the database.
Roll back means “Undo” the changes and Commit means “Applying” the changes. There are three major TCL commands.