Learning SQL by Alan Beaulieu has been one of the most popular SQL books for years, and the 3rd edition brought it up to date with window functions, large databases and even SQL for big data. It’s often recommended as “the” book for beginners who want more depth than a quick-start guide.
Is it the right first book for you? Here’s our review.
Disclosure: some links on this page are affiliate links. If you buy through them, SimplifyDatabase may earn a small commission at no extra cost to you. It helps keep the site free.

At a Glance
| Detail | Info |
|---|---|
| Author | Alan Beaulieu |
| Publisher | O’Reilly Media |
| Edition | 3rd (2020) |
| Examples use | MySQL, with notes on Oracle and SQL Server |
| Level | Beginner to intermediate |
| Verdict | The best all-round SQL foundation for serious beginners |
Who Is It For?
The book is aimed at people who need SQL for real work: developers, analysts, testers and anyone who’ll write queries against a production database. You don’t need any database experience, but it moves faster than the friendliest beginner books, so it suits people who are comfortable with a bit of technical reading.
What the Book Covers
The examples use the Sakila sample database (a fictional DVD rental store), which you can install for free in MySQL. Topics include:
- What databases and SQL are, and how to create and populate tables.
- The query primer:
SELECT,FROM,WHERE,GROUP BY,HAVINGandORDER BY. - Filtering conditions,
NULLs and pattern matching. - Querying multiple tables, set operators and joins (including outer and cross joins).
- Working with strings, numbers and dates, and converting between types.
- Grouping and aggregates, subqueries and conditional logic with
CASE. - Transactions, indexes, constraints, views and metadata.
- New in the 3rd edition: analytic (window) functions, working with very large databases (partitioning and sharding), and an introduction to SQL for big data.
Each chapter ends with short exercises, and the answers are at the back of the book.
What I Like
1. It goes further than most beginner books. You start with SELECT and finish with window functions, partitioning and transactions, all in one book.
2. The explanations are clear and practical. Beaulieu keeps the theory to a minimum and always connects a feature to the kind of problem it solves.
3. One sample database throughout. Using Sakila for every chapter means you spend your time learning SQL, not learning a new data set each time.
4. It mentions other databases. Where Oracle or SQL Server differ from MySQL, the book usually says so, which helps if you use something other than MySQL at work.
What Could Be Better
- It’s MySQL-first. SQL Server users will have to translate some syntax (for example
LIMITvsTOP). - The exercises are short. Good for checking understanding, but you’ll want extra practice.
- The big data chapter is a taster. Don’t expect it to teach you data engineering.
How It Compares
Compared with SQL in 10 Minutes a Day, Learning SQL is deeper and better as a long-term reference. Compared with T-SQL Fundamentals, it’s broader and more beginner-friendly, but less detailed about SQL Server. Many people read Learning SQL first and T-SQL Fundamentals second.
Should You Buy It?
Yes, if you want one solid book that takes you from beginner to confident intermediate, and you’re happy to work through it properly.
Maybe not, if you want the gentlest possible start. In that case, pick something from our list of the best SQL books for absolute beginners first.
Our verdict: Learning SQL is the book we recommend most often to beginners who are serious about SQL. It’s clear, practical and covers everything you need for your first year of real work.
Practise While You Read
Use our free guides to reinforce each chapter: SQL for complete beginners, SQL JOINs, GROUP BY and aggregate functions, the CASE expression and transactions and ACID.
Using SQL Server instead? Read our T-SQL Fundamentals review. For more, browse all book reviews under the SQL Books menu.