SQL SERVER What is DML, DDL, DCL and TCL

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.

Thanks to Pinal Dave. 

Advertisements

6 thoughts on “SQL SERVER What is DML, DDL, DCL and TCL

  1. DML, DDL, DCL and TCL all these are very helpful for interview. Now i come to know that who manage the databese statements, its structure, transactions defined in the database and who manage roles, permissions, and referential integrity defined in the database.
    Great Thanks.

  2. SQL SERVER – Example of DDL, DML, DCL and TCL Commands
    May 2, 2009 by pinaldave
    DML

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

    SELECT – Retrieves data from a table
    INSERT – Inserts data into a table
    UPDATE – Updates existing data into a table
    DELETE – Deletes all records from a table

    DDL

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

    CREATE – Creates objects in the database
    ALTER – Alters objects of the database
    DROP – Deletes objects of the database
    TRUNCATE – Deletes all records from a table and resets table identity to initial value.

    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.

    GRANT – Gives user’s access privileges to database
    REVOKE – Withdraws user’s access privileges to database given with the GRANT command

    TCL

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

    COMMIT – Saves work done in transactions
    ROLLBACK – Restores database to original state since the last COMMIT command in transactions
    SAVE TRANSACTION – Sets a savepoint within a transaction

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s