Learn SQL and Databases the Easy Way
Plain-English guides to SQL, database design and big data, written by a developer who works with databases every day. No jargon, lots of real examples.
Where Do You Want to Start?
New to SQL
Write your first queries and learn to filter, sort and summarise data.
Designing a Database
Build tables that keep your data clean, consistent and easy to query.
Going Further
Speed up queries, protect your data and write smarter SQL.
Latest Articles
- SQL Server Performance Troubleshooting: A Practical Step-by-Step Guide
A practical, step-by-step process for slow SQL Server queries: describe the symptom, check what’s running and blocking, read the plan, fix indexes and statistics, and measure the result. - Missing Indexes in SQL Server: How to Find Them, and When Not to Add Them
SQL Server suggests missing indexes in the execution plan and the DMVs, but copying them blindly creates duplicates and slows writes. Here’s how to find them, read them, and decide. - SQL Date Functions Explained Simply (SQL Server and MySQL)
The date functions you’ll use most in SQL Server and MySQL: current date, DATEADD, DATEDIFF, month end and formatting, plus the BETWEEN mistake that makes monthly totals wrong. - UNION vs UNION ALL in SQL Explained Simply
UNION removes duplicates, UNION ALL keeps every row and is faster. Learn when to use each, the rules every UNION must follow, and the trap that can make your totals wrong. - HAVING vs WHERE in SQL Explained Simply
WHERE filters rows before grouping. HAVING filters groups after GROUP BY. See the difference with a simple sales example, the logical query order, and common mistakes. - Index Seek vs Index Scan: Why SQL Server Ignores Your Index
You created an index but SQL Server still scans the table. Here are the 8 most common reasons, from functions on columns to implicit conversions, with the fix for each. - How to Read a SQL Server Execution Plan (Beginner’s Guide)
Execution plans look confusing at first. Learn to read a SQL Server plan step by step: right to left, arrow thickness, cost percentages, the operators that matter, and a real example. - Eager Index Spool in SQL Server: What It Means and How to Fix It
Seeing an Index Spool (Eager Spool) in your SQL Server execution plan? Here is what it means, why SQL Server builds a temporary index on every run, and the one index that makes it disappear. - SQL Injection Explained Simply: What It Is and How to Prevent It
Understand how SQL injection happens and how to prevent it with parameterised queries in PHP, Laravel, Delphi and C#, plus extra defences.