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 that means it permanently save 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 form of CHANGES in the database. The command of DML is not auto-committed that 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