SQL reference

SQL Guides

Each guide explains one SQL statement or clause with its syntax, worked examples, the places where PostgreSQL, MySQL, SQL Server and SQLite differ, and the mistakes people commonly make.

Querying

Read rows, shape columns and combine result sets.

Filtering

Keep only the rows that match a condition.

Joins

Combine rows from two or more tables.

Aggregation

Summarise rows into groups and totals.

Tables, views & databases (DDL)

Create, change and remove database objects.

Constraints

Rules that keep table data valid.

Changing data

Insert, update and delete rows.