SQL Commands Guide
Fundamental SQL Commands and Database Operations Guide
This document provides a summary of essential Structured Query Language (SQL) commands for
database administrators and developers.
1. Data Definition Language (DDL)
- CREATE TABLE: Used to create a new table.
- ALTER TABLE: Modifies an existing database object.
- DROP TABLE: Deletes a table.
2. Data Manipulation Language (DML)
- INSERT INTO: Adds new data to a table.
- UPDATE: Modifies existing data.
- DELETE: Removes data.
3. Querying
Using SELECT with WHERE, GROUP BY, ORDER BY, and HAVING clauses to filter and organize
data.
4. Joins
Explanations of INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL OUTER JOIN for combining
rows from two or more tables.
5. Transaction Control
- COMMIT: Saves changes.
- ROLLBACK: Undoes changes.