WHAT ARE THE SUB LANGUAGES OF SQL

DDL DML DCL TCL DQL IN SQL

SQL consists of many types of statements which are classified in five types of sub-languages-

Data Definition Language (DDL): to create and modify the structure of the database. All the commands of DDL are auto-committed which means it permanently saves all the changes in the database.
DDL Commands:

           CREATE

           ALTER

           DROP

           TRUNCATE

Data Manipulation Language (DML): DML commands are used to modify the database. It is responsible for all forms of CHANGES in the database. The command of DML is not auto-committed which means it can’t permanently save all the changes in the database. They can be rollback.
DML Commands:

           INSERT

           UPDATE

           DELETE

Data Control Language (DCL): DCL commands are used to GRANT and TAKE BACK authority from any database user.
DCL Commands:

           GRANT

           REVOKE

Transaction Control Language (TCL): TCL commands can only use with DML commands like
INSERT, DELETE and UPDATE only.

TCL Commands:

           COMMIT

           ROLLBACK

           SAVEPOINT

Data Query Language (DQL): DQL is used to fetch the data from the database.
DQL Command:

           SELECT

Leave a Reply

Your email address will not be published. Required fields are marked *