DDL · DML · Joins · Indexes · Transactions · Window Functions · Gotchas
WHERE col = NULL returns 0 rows. Always use IS NULL / IS NOT NULL.WHERE YEAR(created_at) = 2024 → full scan. Use: WHERE created_at BETWEEN '2024-01-01' AND '2024-12-31'0.1 + 0.2 ≠ 0.3 in floating point. Always use DECIMAL for money.utf8mb4 with utf8mb4_unicode_ci.