What are the types of SQL Queries ?

We have four types of SQL Queries:
  • DDL (Data Definition Language): the creation of objects
  • DML (Data Manipulation Language): manipulation of data
  • DCL (Data Control Language): assignment and removal of permissions
  • TCL (Transaction Control Language): saving and restoring changes to a database
Let’s look at the different commands under DDL:
Command Description
CREATE Create objects in the database
ALTER Alters the structure of the database object
DROP Delete objects from the database
TRUNCATE Remove all records from a table permanently
COMMENT Add comments to the data dictionary
RENAME Rename an object