SQL SERVER – What is – DML, DDL, DCL and TCL – Introduction and Examples

DML

DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database.

Examples: SELECT, UPDATE, INSERT statements

DDL

DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of database objects in database.

Examples: CREATE, ALTER, DROP statements

DCL

DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it.

Examples: GRANT, REVOKE statements

TCL

TCL is abbreviation of Transactional Control Language. It is used to manage different transactions occurring within a database.

Examples: COMMIT, ROLLBACK statements

Reference : Pinal Dave (https://blog.sqlauthority.com)

Database
Previous Post
SQL SERVER – Time Out Due to Executing DELETE on Large RecordSet
Next Post
SQLAuthroity News – Microsoft SQL Server 2000 Assessment Configuration Pack

Related Posts

170 Comments. Leave new

  • Dear readers please tell which command act as a both DDL and DML Command.

    Reply
  • DML : Insert, Update, Delete, Merge.
    DDL : Create, Alter, Drop, Rename, Truncate.
    TC : Commit, Rollback, Savepoint.
    DCL : Grant, Revoke.

    Reply
  • plz explain me with example how to commit and rollback in sqlserver at staring level how it work with query example

    Reply
  • Prasanna Pashte
    February 9, 2012 7:40 pm

    Hi Mr. Pinal Dave,

    I am Prasanna – learner and new at SQL
    can you please explain that how do I takkle the problem below.

    I have three tables A, B and C

    A – Temperory data
    B – All Raw data
    C – History Data

    please note that the table structure and column names are same in all three tables.
    I have updated data in table A.
    I already have some old data in table B.
    Table C is empty.
    Now I want to append the updated data (records) from table A to table B. However there may be duplicate records found while appending the data. I dont want to delete duplicate data(records) found from table B. I just want to move that records from table B to table C and append the updated data from table A to table B. The first column is Identicle in all three tables –
    Note :- The first column is SO Number and there are 1000 SO number which are 5 digits number and there may be multiple records under 1 particular SO.

    Please tell me the stored procedure for this.

    Thanks & Regards,
    Prasanna

    Reply
  • its so impressive

    Reply
  • give me some examples of DQL AND DRL ,is SELECT command belongs to both of these langusges?

    Reply
  • voltas it solutions
    March 7, 2012 5:54 pm

    sir can i have sql dba experienced resumes

    Reply
  • ph it solutions
    March 7, 2012 5:56 pm

    sir plz send me experienced resumes of sql dba

    Reply
  • jiit raj chaurasia
    March 11, 2012 7:21 pm

    RDBMS means ?

    Reply
  • THNX
    SIRJI

    Reply
  • Shahnawaz Akhtar
    March 21, 2012 7:23 pm

    Sir plz tell me
    what is rename, truncate, grant, revoke, commit and rollback in database?
    please tell me exact defination of those query. please sir

    Reply
  • I am a student at klu (vijayawada) i cant understand what my professor is teaching but i am familier with SQL as i m reading u r posts….
    THANKS A LOT

    Reply
  • is MsSQL and SQL server are same?

    Reply
  • sir i want the ddl dml dcl tcl commands syntax’s…..

    Reply
  • one extra DQL data query language and select is part of dql not dml only three are part of dml insert, update, delete.

    Reply
  • why do we call ‘alter’ a ddl command?

    Reply
  • Navnath Basude
    June 19, 2012 6:30 pm

    sir I want to know is there Comment Statement in DDL. Plz reply fast……………..!!!!!!!!!!!!

    Reply
  • sagar

    alter table and alter database are ddl cmd only

    Reply
  • All Commands are very useful

    Reply
  • thats good but, I want the whole information of DDL, DCL, DML, TCL.
    actually now I am study in s.y. BCA….in s.p. uni.

    Reply

Leave a Reply