SQL Sub Languages

 SQL Sub Languages

SQL commands are grouped into below major categories depending on their functionality

    1) Data Definition Language (DDL)
    2) Data Manipulation Language (DML)
    3) Transaction Control Language (TCL)
    4) Data Control Language (DCL)
    5) Data Query Language (DQL)

Data Definition Language (DDL) :-DDL commands are used to create, alter, drop, rename of a database objects like table,view,sequence,index etc .These commands works on structure.

Below are listed command under DDL

        1) CREATE
        2) ALTER
        3) DROP
        4) RENAME
        5) TRUNCATE


Data Manipulation Language (DML):-DML commands work on records in a table. These are basic operations we perform on data such as inserting new records, deleting unnecessary records, and updating existing records.

Below are listed command under DDL
        1) UPDATE
        2) DELETE
        3) INSERT

Transaction Control Language (TCL):- The commands of SQL that are used to control the transactions made against the database.

Below are listed command under DDL
         1) COMMIT
         2) ROLLBACK
         3) SAVEPOINT

Data Control Language (DCL):-These commands of SQL are used to give the permission or revoke the permission on System/User's objects to user/role in the database

Below are listed command under DDL
         1) GRANT
         2) REVOKE

Data Query Language (DCL):-This command is used to select the data from database tables,view,synonyms and sequence etc. 

Below are listed command under DDL
         1) SELECT

NOTE:- TCL Commands(COMMIT,ROLLBACK,SAVEPOINT) are used for only DML Commands (INSERT,UPDATE,DELETE) while DDL,DCL commands are Auto-committed.

2 comments: