Data Definition Language (DDL)
AIgo Notes
Home
Tools
Pricing
Download
Unlimited notes
Login
Home
›
Public Notes
›
Note details
Data Definition Language (DDL)
BY 8znba
July 2, 2025
•
Public
Private
631 views
Understanding Data Definition Language (DDL) in SQL
Overview
The focus of the presentation is on
Data Definition Language (DDL)
, a sublanguage of SQL.
SQL has four sublanguages:
DDL
- Data Definition Language
DML
- Data Manipulation Language
DCL
- Data Control Language
TCL
- Transaction Control Language
DDL
commands affect the
structure
of the table, unlike DML, which deals with data.
Key DDL Concepts
DDL
commands are
auto-committed
: When changes are made using DDL commands, they are immediately saved without needing an explicit commit.
DDL Commands
Create Command
Used to create a new table or object.
Example: Creating a table with columns ID, Name, Department Name, and Salary.
Alter Command
Used to modify an existing table structure.
Allows adding or dropping columns, or changing data types.
Truncate & Drop Commands
Both are used to remove data or structures.
The differences between truncate and drop will be covered in future lectures.
Rename Command
Used to change the name of a table.
Maintains the table's existing attributes (columns) while changing its name.
Example
Employee Table with Columns:
ID
Name
Department Name
Salary
Future Insights
Upcoming lectures will cover detailed examples of creating, altering, truncating, dropping, and renaming tables using DDL commands.
Conclusion
This presentation provided a foundational understanding of DDL and its significance in SQL.
Further examples and detailed explanations will follow in subsequent lectures.
[Applause]
[Music]
Transcript
Share & Export