DDL,DML,DCL & TCL Statements in SQL

DDL,DML,DCL & TCL Statements in SQL

DDL-   Data Definition Language

  This statement used to Create, Alter, Drop and Truncate in exist table of the database.

Create-  used create new object like Table , View , Store procedure, function, Index  or etc.
Alter - used to modify the table , store procedure or etc
Drop - used to remove exist instance like table , store procedure o etc.
Truncate - used to erase all the existing data or rows inside the table.


DML- Data Manipulation Language

This statement used to retrieve , insert, update, delete the data in table

Select - used to retrieve the data from table or view here syntax ex:-  select * from temp.
Insert - used to insert one or more than in a table.
Delete- used delete the particular row or more than one rows.
Update- used to update the  one  or more rows which is existing in the table.
Bulk Insert-Imports a data file to into a table.
Merge-used to insert , update, delete the data on target based table with help JOIN with source table
            in one transaction.


DCL- Data Control Language

It is used to provide security  and provide access control for store the data in database.

Grant- it provide the user to access  the database like like insert update delete or retrieve the data                    from database.
Revoke- Its means remove the Grant in the sense remove access control or remove permission.
Execute As- sets the execution context of the session. generally execute the user-defined-function
                      ex:- Execute  EmployeeFunc.
Revert- switches the execution context back to caller of the last execute as statement.


TCL- Transaction Control Language

Used to managed the changes by the DML statements.

Begin Transaction
Commit Transaction
Rollback Transaction













Share this

Previous
Next Post »