What is DDL, DML and DCL in MySQL?
1. DDL
In MySQL, DDL is the short form for Data Definition Language, which is used in database schemas and descriptions while deciding how data should reside in the database.
Here’s a list of DDL Queries:
- CREATE
- ALTER
- DROP
- TRUNCATE
- COMMENT
- RENAME
2. DML
DML is a short form for Data Manipulation Language which is used in data manipulation and mostly includes common SQL statements to store, modify, retrieve, delete and update data in a database.
Here is the list of DML Queries:
- SELECT
- INSERT
- UPDATE
- DELETE
- MERGE
- CALL
- EXPLAIN PLAN
- LOCK TABLE
3. DCL
DCL is a short form for Data Control Language including commands which are concerned with User rights, permissions and other controls within the database system.
Here’s a list of queries for DCL:
- GRANT
- REVOKE
BY Best Interview Question ON 20 Sep 2022