MySQL Course
Learn SQL by running it - a real query engine over a real dataset, in the page.
Take this course in the learning hubLessons
- Your first SELECTSELECT names the columns, FROM names the table. Everything else is refinement.
- Filtering with WHEREWHERE runs before anything else, so it decides how much work the rest has to do.
- ORDER BY and LIMITSorting and paging - and why LIMIT without ORDER BY is a bug waiting to happen.
- JOIN: combining two tablesRows in one table point at rows in another. JOIN is how you follow the pointer.
- GROUP BY and aggregatesCollapse many rows into one summary row per group.
- Indexes: why one query is slowAn index is a sorted lookup structure - and the wrong one is worse than none.
- Transactions and ACIDSeveral statements, one all-or-nothing unit - and what happens when it fails midway.
- Isolation levelsHow much of other transactions you are allowed to see - and what it costs.
- SQL injection and how to stop itThe vulnerability that comes from building a query out of strings.
- Designing a schemaNormalise until it hurts, denormalise until it works - and pick types deliberately.
- Reading EXPLAINThe one tool that turns "the database is slow" into a specific, fixable problem.
- Connections and poolingWhy a Java app opens ten connections and not one per request.
- NULL: the value that breaks comparisonsThree-valued logic, and why a WHERE clause silently drops rows.
- Window functionsRanking, running totals and per-group comparisons without a self-join.
- Common table expressions and recursionNaming a subquery, and walking a tree in SQL.
- Constraints: letting the database enforce the rulesRules in the schema hold even when application code is wrong.
- What an index actually isB+ trees, clustered keys, and why column order decides everything.
- Row locks, gap locks and deadlocksInnoDB locks index entries, not rows - which explains most surprising blocks.
- Finding the query that is actually slowEXPLAIN ANALYZE, the slow log and performance_schema - evidence over intuition.
- Replication and reading from replicasReplication lag is not a bug, and your application has to expect it.
- JSON columns and partitioned tablesTwo features that solve real problems and are frequently misused.