This content originally appeared on DEV Community and was authored by Aruna Arun
SQL (Structured Query Language) is a standard language used to interact with databases.
It allows you to:
•Store data
•Retrieve data
•Update data
•Delete data
•Manage databases and table.
SQL is the language of databases.
Types of SQL Commands
SQL is divided into different types based on their purpose:
1.DDL (Data Definition Language) – Defines the structure of the database.
Examples:
•CREATE → create a new table/database
•ALTER → modify an existing table
•DROP → delete a table/database
•TRUNCATE → delete all data in a table but keep the structure
2.DML (Data Manipulation Language)
– Deals with data inside tables.
Examples:
INSERT → add new records
UPDATE → modify existing records
DELETE → remove records
3.DQL (Data Query Language)
– Used to query (fetch) data.
Example:
SELECT → retrieve data from tables
4.DCL (Data Control Language)
– Manages permissions and access.
Examples:
GRANT → give access rights
REVOKE → remove access rights
5.TCL (Transaction Control Language)
– Manages transactions in the database.
Examples:
COMMIT → save changes
ROLLBACK → undo changes
SAVEPOINT → create a checkpoint
Simple way to remember:
DDL → Structure
DML → Data
DQL → Query
DCL → Control
TCL → Transaction
This content originally appeared on DEV Community and was authored by Aruna Arun

Aruna Arun | Sciencx (2025-08-19T14:43:52+00:00) Day1: SQL. Retrieved from https://www.scien.cx/2025/08/19/day1-sql/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.