there are a Large variety of SQL commands and these commands divided into three basic groups as per the use of the commands, Data Definition Language, Data Manipulation Language, and Data Control Language.
Data Definition Language or Data description language deals with database schema and descriptions of how the data should reside in the database, therefore language statements like CREATE TABLE or ALTER TABLE belong to DDL.
Some of the commands which belong to DDL
- CREATE – to create objects in the database
- ALTER – alters the Schema of the database
- DROP – delete objects from the database
- COMMENT – add the comments
- RENAME – rename the object
Data Manipulation Language deals with data manipulation, and therefore includes most common SQL statements such as SELECT, INSERT, etc.
Some of the commands which belong to DML
- SELECT – retrieve data from the database
- INSERT – insert data or row into a database table
- UPDATE – updates existing data within a table
- DELETE – deletes all records from a table
Data Control Language includes commands such as GRANT and mostly concerns with rights, permissions and other controls of the database system.
Some of the commands which belong to DCL
- GRANT – grant permissions to the user for certain database
- REVOKE – withdraw access privileges that are given to the User