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 Parameter Sniffing: Why a Query Is Fast in SSMS but Slow in the App
Why the same SQL Server procedure is fast for one value and painfully slow for another, or fast in SSMS but slow in your application, how to confirm it is parameter sniffing, and six fixes with when to use each. - Running Totals in SQL Server: Cumulative Sums and Running Balances
How to calculate a running total and a running account balance in SQL Server with SUM() OVER, reset it per month or account, and avoid the two mistakes that give wrong or slow results. - SQL LIKE, IN and BETWEEN Explained Simply
Search text with LIKE, match a list with IN and filter ranges with BETWEEN, with simple examples, the NOT IN NULL trap and the date BETWEEN mistake that hides rows. - How to Learn SQL: A Step-by-Step Roadmap for Beginners
A clear, 9-stage plan to learn SQL from zero: what to learn first, in what order, how long each stage takes, and a free tutorial for every step. - SQL String Functions Explained Simply (SQL Server and MySQL)
The SQL string functions you’ll use most in SQL Server and MySQL: CONCAT, LEN, TRIM, SUBSTRING, CHARINDEX, REPLACE and STRING_AGG, plus the NULL trap that blanks whole results. - 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.