SQL — Command Reference
SQL's most used commands — the universal language of querying databases. Each example is a complete script (create table, insert data, query). Each includes an explanation and a working example.
7 categories · 15 commands
🔎
Querying (SELECT)
The basis of data retrieval.
SELECTSELECT *DISTINCT🗃️
Creating a Table
Defining data structure.
CREATE TABLE✏️
Inserting & Modifying Data
INSERT, UPDATE, DELETE.
INSERT INTOUPDATEDELETE🧲
Filtering (WHERE)
Selecting rows based on a condition.
WHERELIKEIN / BETWEEN🔢
Sorting & Limiting
ORDER BY and LIMIT.
ORDER BYLIMIT📊
Aggregate Functions
COUNT, SUM, AVG and GROUP BY.
COUNT / SUM / AVGGROUP BY🔗
Joins (JOIN)
Relating two tables.
INNER JOIN