SQL Server Languages – DML, DDL, DCL and TCL

SQL Server Languages – DML, DDL, DCL and TCL

Howdy Readers,

A heartily welcome to the blog! This is my first post in SQL Server category. Hope you will enjoy reading.

Microsoft SQL Server is a relational database management system (RDBMS) developed by Microsoft. Click To Tweet

There are mainly 4 types of language statements or commands in SQL Server.

DML

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

SQL Server Languages - DML, DDL, DCL & TCL

SQL Server Languages – DML, DDL, DCL & TCL

Examples: SELECT, UPDATE, INSERT, DELETE statements

  1. SELECT – used for retrieving data from the database.
  2. UPDATE – used for modifying the data in the database.
  3. INSERT – used for adding or inserting new data into database.
  4. DELETE – used for deleting the already existing data from database.

DDL

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

Examples: CREATE, ALTER, DROP, TRUNCATE  statements

  1. CREATE – used for create database objects like tables, stored procedures, functions etc.
  2. ALTER – used for modifying the existing database objects like tables, stored procedures, functions etc.
  3. DROP – used to drop or deleted the existing database objects.
  4. TRUNCATE – used to delete all the records from table and to reset identity of column 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.

Examples: GRANT, REVOKE statements

  1. GRANT – used for creating access permissions for users to database.
  2. REVOKE – used for revoking the already assigned permissions.

TCL

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

Examples: COMMIT, ROLLBACK, SAVE TRANSACTION statements

  1. COMMIT – used for saving the work done in a particular transaction. For example: “Ctrl + S” in word file.
  2. ROLLBACK – used for reverting the transaction to the original state before commit. For example: “Ctrl + Z” in word file.
  3. SAVE TRANSACTION – used for setting save point in transactions.

SQL Server Languages – DML, DDL, DCL and TCL

SQL Server Languages - DML, DDL, DCL and TCL

SQL Server Languages – DML, DDL, DCL and TCL

Here we conclude our topic – SQL Server Languages – DML, DDL, DCL & TCL. Hope it helped you in knowing different type of language commands in SQL Server 🙂 For ASP.NET realted articles you can refer there articles.

What do you think?

Dear Reader,
If you have any questions or suggestions please feel free to email us or put your thoughts as comments below. We would love to hear from you. If you found this post or article useful then please share along with your friends and help them to learn.

Happy Learning 🙂