I Help You
Databases

DDL, DML, DCL and TCL

SQL commands are grouped by what they do. DDL (Data Definition Language) defines the structure of the database: CREATE, ALTER, DROP and TRUNCATE. DML (Data Manipulation Language) works with the data inside tables: SELECT, INSERT, UPDATE and DELETE (SELECT is sometimes grouped separately as DQL, Data Query Language).

DCL (Data Control Language) manages permissions with GRANT and REVOKE. TCL (Transaction Control Language) manages transactions with COMMIT, ROLLBACK and SAVEPOINT. In many databases, DDL commands commit automatically and cannot be rolled back, while DML changes can be.

ExamplesSQL
-- DDL
CREATE TABLE students (id INT PRIMARY KEY, name VARCHAR(100));
-- DML
INSERT INTO students VALUES (1, 'Priya');
-- DCL
GRANT SELECT ON students TO report_user;
-- TCL
COMMIT;

Try the related tools