🏗️ DDL (Data Definition Language) in SQL
Last Updated: January 2026
DDL (Data Definition Language) is a category of SQL commands used to define, create, modify, and delete database structures.
👉 DDL works on schema / structure, not on table data.
- Create tables and databases
- Modify table structure
- Remove tables or schemas
- Define columns, data types, constraints
Hinglish Tip 🗣: Database ka structure banana ya badalna ho → DDL commands use hote hain.
🧩 DDL Commands
We will cover each command in a separate tutorial. Here is just the big picture 👇
CREATE
- Used to create database objects
- Tables, databases, views, indexes
CREATE TABLE table_name (...);
ALTER
- Used to modify existing table structure
- Add / drop / change columns
ALTER TABLE table_name ADD column datatype;
DROP
- Used to permanently delete database objects
- Table structure + data both removed
DROP TABLE table_name;
TRUNCATE
- Used to remove all data from a table
- Structure remains
TRUNCATE TABLE table_name;
ALTER TABLE
- Used to rename table or object
- Not supported in same way by all DBs
RENAME TABLE old_name TO new_name;