https://github.com/yuhexiong/ddl-dml-dcl-tcl-commands-sql
https://github.com/yuhexiong/ddl-dml-dcl-tcl-commands-sql
sql sql-commands
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuhexiong/ddl-dml-dcl-tcl-commands-sql
- Owner: yuhexiong
- Created: 2024-01-11T07:25:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-23T02:31:50.000Z (over 2 years ago)
- Last Synced: 2025-10-23T11:47:27.816Z (8 months ago)
- Topics: sql, sql-commands
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SQL Commands DDL, DML, DCL, TCL
SQL Categories Based on [W3Schools](https://www.w3schools.in/mysql/ddl-dml-dcl/)
### DDL (Data Definition Language):
- CREATE: Create database objects such as tables, indexes, views, etc.
- ALTER: Modify the structure of an existing database.
- DROP: Delete database objects like tables, indexes, views, etc.
- TRUNCATE: Remove all records from a table, freeing allocated space.
### DML (Data Manipulation Language):
- SELECT: Query the database for records.
- INSERT: Add new records to a table.
- UPDATE: Modify existing records in a table.
- DELETE: Remove records from a table.
- MERGE: Performs a UPSERT operation (insert or update) on a table.
- CALL: Calls a stored procedure or Java subprogram.
- EXPLAIN: Displays the execution plan for a given query.
- LOCK TABLE: Locks a table to prevent other users from modifying it while a transaction progresses.
### DCL (Data Control Language):
- GRANT: Grant permissions to users or roles.
- REVOKE: Revoke permissions from users or roles.
### TCL (Transaction Control Language):
- COMMIT: Commit all modifications made within the current transaction.
- ROLLBACK: Rollback all modifications made within the current transaction.
- SAVEPOINT: Set a savepoint within a transaction for later rollback if needed.