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)

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

  • 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
  • Thanks so much.

    Reply
  • Hi Pinal Dave,

    I am new to MS Sql server. I want to know the command used to describe the table ,since DESC is not working with Ms SQL Server.

    also I would like to know sql querys for following scenarios

    Owner of the company wants to create 5 users,3 in following fashion
    1) 2 -Must have authority of admin
    2) 2- Normal user
    3) 1 – User whose password is blocked for 15 days

    Regards,
    kappy

    Reply
  • plz send the syntaxs of the create,alter,drop,truncat

    Reply
  • SELECT is a DRL statement.

    DRL ::

    DRL means Data Retrieval Language. This will be used for the retrieval of the data from the database.
    In order to see the data present in the database, we will use DRL statement. We have only one DRL
    statement.

    SELECT is the only DRL statement in SQL

    Reply
  • sreekanth bandi
    November 30, 2012 2:34 pm

    HI HARDIK ,

    my sql and sql server are defferent

    Reply
  • Hi Pinal Dave,

    I’m new to Sqlserver, can you help me with a tutorial for syntax.

    Reply
  • Hi Pinal
    Wishing You a Very Very Happy New Year 2013.
    great Person SQL Guru
    I am new to started My SQL study , Please help me when I require.

    Reply
  • Dear sir,
    how did i want to move a table from one database to another database….??

    Reply
    • Use Import/Export wizard, SSIS, or Query. Here is the example for query

      SELECT * INTO newdb..table_name from table_name

      Reply
  • Osssmmmm explanation I understand very clearlly.

    Reply
  • thanks for information, i was preparing this for my DBMS exam

    Reply
  • i need a perfect difference between commit and rollback

    Reply
  • chigicherla Mallikarjuna
    May 17, 2013 8:27 pm

    DQL: Data Query Language
    Select command is using in DQL

    Reply
  • VERY NICE

    Reply
  • rajinder kaur
    July 24, 2013 10:23 am

    SIR IF WE USING NULL THAN WE AVAIL SPACE FOR THAT COLUMN

    Reply
  • TCL

    Transaction Control (TCL) statements are used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.
    COMMIT – save work done
    SAVEPOINT – identify a point in a transaction to which you can later roll back
    ROLLBACK – restore database to original since the last COMMIT
    SET TRANSACTION – Change transaction options like isolation level and what rollback segment to use

    Reply
  • session control is possible in TCL

    Reply
  • What kind of sql permission be granted to a user who wants to to execute DDL, DML TCL commands?

    Reply
  • Great post. I was checking constantly this weblog and I’m inspired!
    Extremely useful information particularly the
    closing part :) I care for such information a lot. I used to be seeking this particular information
    for a very lengthy time. Thank you and best of luck.

    Reply
  • Hello sir, I want to know that how char and varchar works.
    Ex. shalini and shalini05 will work for char?

    Reply

Leave a Reply

Menu