Learn SQL and Databases the Easy Way
Plain-English guides to SQL, SQL Server performance, database design, data analysis and Delphi, 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.
My Queries Are Slow
Find out why SQL Server is slow and fix it step by step.
Delphi + SQL Server
Build fast business apps in Delphi that work with SQL Server.
SQL for Data Analysis
Clean, summarise and report on your data with SQL.
Latest Articles
- Calendar Table in SQL: Working Days, Holidays and Reports With No Gaps
How to build a calendar (date dimension) table in SQL Server and MySQL, with your own weekend, holidays and fiscal year, and use it for working days, due dates and reports that show days with zero sales. - User Login and Permissions in a Delphi ERP App (Roles, Hashed Passwords, SQL Server)
Add login and role-based permissions to a Delphi ERP app: SQL Server tables, Windows login or PBKDF2 password hashes, actions that hide themselves, and real security. - Export Data from Delphi to Excel, CSV and PDF (With Ready-to-Use Code)
“Can I have this in Excel?” Export any Delphi dataset to CSV (Arabic-safe UTF-8), straight into Excel in one fast step, or to PDF, with reusable code. - Print Invoices and Reports in Delphi with FastReport (Step by Step)
Print a professional invoice from Delphi with FastReport: two SQL queries, a header band, a lines band, totals, preview, direct printing and PDF export. - Call SQL Server Stored Procedures from Delphi with FireDAC (TFDStoredProc)
Call SQL Server stored procedures from Delphi with FireDAC: post a customer receipt with an OUTPUT parameter, load a statement result set, and handle THROW errors. - SQL Quick Reference PDF: Free Printable MySQL and SQL Server Cheat Sheet
A free, printable A4 SQL quick reference: 20 topics on one page each, with MySQL and SQL Server syntax side by side, a 6-page cheat sheet and the 12 traps that cause wrong results. - ShopDB: A Free Sample Database for Practising SQL (MySQL and SQL Server)
Download ShopDB, a free practice database for MySQL and SQL Server: six linked tables, realistic orders data, built-in traps and 10 questions to try. - Delphi Transactions with FireDAC: Save a Balanced Journal Entry (All or Nothing)
Save an accounting journal entry from Delphi all or nothing: FireDAC StartTransaction, Commit and Rollback, a debit = credit check in Delphi and SQL, and reversals. - Master-Detail Forms in Delphi: Invoice Header and Invoice Lines (FireDAC)
Build the most common ERP screen, an invoice with header and lines, using Delphi master-detail datasets, an item lookup, calculated line totals and an invoice total.