SQL Sub Languages-Learn about types of statements used in SQL and their classification with explanation.

SQL consists of many type of statements, which classified as sub languages.
There are 6 sublanguages in SQL.

DDL – Data Definition Language.
DML – Data Manipulation Language.
DRL/DQL – Data Retrieval Language/Data Query Language.
TCL – Transaction Query Language.
DCL – Data Control Language.
SCL – Session Control Language.

DDL-Data Definition Language

– Used to define Database objects like TABLE, VIEW,SEQUENCE,INDEX,SYNONYM creation or modification or removing.
CREATE,ALTER,DROP,TRUNCATE,RENAME are the DDL commands

DML – Data Manipulation Language

-Used to manipulate the data in Database objects like table, view, index ..etc,.
-INSERT, UPDATE, DELETE are the DML commands.

DRL/DQL-Data Retrieval Language/Data Query Language

-used to retrieve information from the database objects. it is for read only purpose.
– SELECT is the DQL or DRL command.

TCL – Transaction Control Language

-Transaction control statement are use to apply the changes permanently save into database.
-COMMIT, ROLLBACK, SAVEPOINT, ROLLBACK TO are the TCL commands.

DCL – Data Control Language

Data control statements are use to give privileges to access limited data or share the information between users.
-GRANT,REVOKE ,AUDIT,COMMENT, ANALYZE are the DCL commands.

SCL- Session Control Language

Session control statement are manage properties dynamically of a user session.
-ALTER SESSION,SET ROLL are the SCL commands.

Related Posts