SQL Server Languages – DML, DDL, DCL and TCL

SQL Server Languages – DML, DDL, DCL & TCL

In this blog, we are listing the different types of SQL Server Languages termed as commands or statements.

These statements or commands are categorized as per their functionality.

SQL Server Languages or Commands

There are mainly four types of language statements or commands in SQL Server – DML, DDL, DCL, and TCL.

Let’s find out more about each one of them in detail.

DML

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

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 the database.
  4. DELETE – used for deleting the already existing data from the database.

⭐ SELECT is a DQL (Data Query Language) statement. Since its the only DQL statement, we have covered in under DML.

View this post on Instagram

As promised, posting the part 2 of the SQL Basics Series. { Swipe Left} . . Earlier, I have shared information on SQL Joins. . . DML stands for Data Manipulation Language and these statements or commands are used for adding, modifying or removing the data from database. . . Support us by following @dotnetcrunch 💓 . . #sql #sqlserver #sqlbasics #sqlbasicsforbeginners #sqlbasic #dotnetcrunch #sqldeveloper #structuredquerylanguage #sqldatabase #mysql #oraclecards #oracle #dml #datamanipulation #dmlcommands #sqlcommand #sqlcommunity #sqlserver2016 #sqlsaturday #ssms #sqlservermanagementstudio #microsoftsqlserver #dotnetcrunch😉tysm #learnsql #sqltraining #sqlblog #sqlauthority #sqldevelopers #sqlinjection #sqlite . Thanks for your time 🤞🏻

A post shared by DotNetCrunch️️ (@dotnetcrunch) on

DDL

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

Examples: CREATE, ALTER, DROP, TRUNCATE  statements

  1. CREATE – used for creating 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 delete the existing database objects.
  4. TRUNCATE – used to delete all the records from the table and to reset the identity of the column to initial value.

View this post on Instagram

This is part 3 of the SQL Basics Series. { Swipe Left} ✅ to know more… . . You may check our previous 2 posts on SQL as well. . . DDL stands for Data Definition Language and these statements or commands are used for creating, modifying or removing the database objects from the database. . . Support us by following @dotnetcrunch 💓 . . . . #sql #sqlserver #sqlbasics #sqlbasicsforbeginners #sqlbasic #dotnetcrunch #sqldeveloper #structuredquerylanguage #sqldatabase #mysql #oraclecards #oracle #ddl #datamanipulation #ddlcommands #sqlcommand #sqlcommunity #sqlserver2016 #sqlsaturday #ssms #sqlservermanagementstudio #microsoftsqlserver #dotnetcrunch😉tysm #learnsql #sqltraining #sqlblog #sqlauthority #sqldevelopers #sqlinjection #sqlite . Thanks for your time 🤞🏻

A post shared by DotNetCrunch️️ (@dotnetcrunch) on

DCL

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

Examples: GRANT, REVOKE statements

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

11298 82833411298

TCL

TCL is the 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.

To know more about TCL or Transact-SQL or any of these SQL Server Languages, you may refer to Microsoft Docs.

I hope you like the information given for SQL Server Languages or Commands in this blog. Please share it with your friends and colleagues using the below buttons.

[mashshare]

Happy Querying!

Share with your friends:

Leave a Comment

Your email address will not be published. Required fields are marked *