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 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. - Database Backup and Restore Explained Simply (SQL Server, MySQL and PostgreSQL)
How database backups work: full, differential and log backups, point-in-time restore, the 3-2-1 rule, and commands for SQL Server, MySQL and PostgreSQL. - SQL Triggers Explained Simply (With a Price History Example)
Learn what SQL triggers are, how to write them in SQL Server, MySQL and PostgreSQL, and when they help or hurt, with a price history example. - NULL in SQL Explained Simply: IS NULL, COALESCE and Common Traps
Understand what NULL means in SQL, why = NULL never works, and how to handle missing values with IS NULL, COALESCE and NULLIF. - The SQL CASE Expression Explained Simply (With Examples)
Learn how to use the SQL CASE expression for if/then/else logic: labels, conditional counts, custom sorting and more, with simple examples. - SQL Constraints Explained Simply: NOT NULL, UNIQUE, CHECK and DEFAULT
Learn how SQL constraints like NOT NULL, UNIQUE, CHECK and DEFAULT protect your data, with simple examples you can use right away. - SQL Data Types Explained Simply: Choosing the Right Type for Each Column
A practical guide to SQL data types: numbers, text, dates and more, with differences between SQL Server, MySQL and PostgreSQL. - SQL Window Functions Explained Simply (ROW_NUMBER, RANK, LAG and More)
A beginner-friendly guide to SQL window functions: OVER, PARTITION BY, ROW_NUMBER, RANK, running totals and LAG, with clear examples. - SQL Stored Procedures Explained Simply (SQL Server, MySQL and PostgreSQL)
Learn what stored procedures are, how to create and run them in SQL Server, MySQL and PostgreSQL, and when they are worth using.