---
title: "What are the 4 types of commands in SQL?"  
description: "What are the 4 types of commands in SQL?"  
author: "Revati S Misra"  
published: 2023-08-27  
updated: 2023-08-28  
canonical: https://www.mindstick.com/forum/159678/what-are-the-4-types-of-commands-in-sql  
category: "mssql server"  
tags: ["mssql server", "sql server", "sql"]  
reading_time: 2 minutes  

---

# What are the 4 types of commands in SQL?

What are the 4 types of [commands](https://www.mindstick.com/interview/817/what-is-the-use-of-dbcc-commands) in [SQL](https://www.mindstick.com/articles/13115/types-of-keys-in-sql-or-oracle-database)?

## Replies

### Reply by Aryan Kumar

There are 5 types of SQL commands:

- **Data Definition Language (DDL):** Commands that are used to create, alter, and drop database objects such as tables, views, and stored procedures.
- **Data Manipulation Language (DML):** Commands that are used to insert, update, delete, and select data from tables.
- **Data Query Language (DQL):** Commands that are used to retrieve data from tables.
- **Transaction Control Language (TCL):** Commands that are used to manage transactions, such as starting, committing, and rolling back transactions.
- **Data Control Language (DCL):** Commands that are used to manage user access to databases, such as granting and revoking permissions.

Here is a table summarizing the 5 types of SQL commands:

| Type | Description |
| --- | --- |
| DDL | Used to create, alter, and drop database objects such as tables, views, and stored procedures. |
| DML | Used to insert, update, delete, and select data from tables. |
| DQL | Used to retrieve data from tables. |
| TCL | Used to manage transactions, such as starting, committing, and rolling back transactions. |
| DCL | Used to manage user access to databases, such as granting and revoking permissions. |


---

Original Source: https://www.mindstick.com/forum/159678/what-are-the-4-types-of-commands-in-sql

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
