New
Pages
911
Published
2008
SQL The Complete Reference, 3rd Edition
The definitive reference to SQL standards, syntax, and implementation across all major database systems
Master SQL from first query to advanced optimization, with complete coverage of every major database platform and the ANSI/ISO standard.
SQL The Complete Reference, 3rd Edition covers the full SQL language from foundational SELECT statements to window functions, stored procedures, and transaction control. Written for both learners and working professionals, it maps every feature against the ANSI/ISO standard while documenting real-world behavior across Oracle, SQL Server, MySQL, PostgreSQL, and DB2. At 911 pages, this is the reference you reach for when documentation fails and you need to know exactly what the standard says and how each platform deviates from it.
About this book
SQL is the language of data. Whether you are writing your first query or tuning a complex multi-table join on a production system, you need a reference that tells you not just the syntax but the behavior β what the standard requires, what your database actually does, and where the two diverge.
SQL The Complete Reference, 3rd Edition by James R. Groff, Paul N. Weinberg, and Andy Oppel is that reference. Now in its third edition, it covers the ANSI/ISO SQL standard in full and maps every feature against Oracle, Microsoft SQL Server, MySQL, PostgreSQL, and IBM DB2. You get one authoritative source instead of five vendor manuals.
The book opens with a rigorous treatment of relational theory β not to be academic, but because understanding why SQL works the way it does makes every subsequent topic click faster. From there it moves through data retrieval, aggregation, subqueries, joins, set operations, and views before tackling the procedural extensions: stored procedures, triggers, user-defined functions, and cursors. The later chapters cover transaction management, concurrency control, security, and the SQL/XML and SQL/OLAP extensions that are increasingly central to modern analytics workloads.
What separates this book from a thin syntax cheat-sheet is the depth of cross-platform detail. Each feature section explicitly notes which databases support it, which deviate from the standard, and what workarounds exist when your platform falls short. That makes it equally useful whether you are writing portable SQL or targeting a specific engine.
- Complete ANSI/ISO SQL standard coverage, from SQL-92 through SQL:2003 features
- Side-by-side platform comparisons for Oracle, SQL Server, MySQL, PostgreSQL, and DB2
- Detailed treatment of joins, subqueries, aggregates, and window functions
- Stored procedures, triggers, and user-defined functions across all major dialects
- Transaction control, isolation levels, and concurrency explained with practical examples
- SQL/XML and OLAP extensions for analytical and reporting workloads
This is a reference book in the best sense: dense, precise, and organized so you can find what you need in seconds. It belongs on the desk of any developer, analyst, or DBA who writes SQL regularly and needs answers that go deeper than a Stack Overflow snippet.
π― What you'll learn
- Read and write correct SQL against the ANSI/ISO standard so your queries are portable by default.
- Identify exactly how Oracle, SQL Server, MySQL, PostgreSQL, and DB2 each deviate from the standard and why.
- Construct complex multi-table joins, correlated subqueries, and set operations with confidence.
- Apply window functions and analytic aggregates to solve ranking, running-total, and partitioning problems.
- Write stored procedures, triggers, and user-defined functions in the major SQL dialects.
- Control transactions and isolation levels to avoid dirty reads, phantom rows, and deadlocks.
- Secure database objects with a precise understanding of SQL privileges and roles.
- Use SQL/XML and SQL/OLAP extensions to query and aggregate structured analytical data.
π€ Who is this book for?
- Database developers who write SQL daily and need a single authoritative source covering standard and platform-specific behavior.
- Data analysts moving beyond basic SELECT queries who want to understand aggregation, window functions, and set operations properly.
- DBAs responsible for multiple database platforms who need side-by-side comparisons of Oracle, SQL Server, MySQL, PostgreSQL, and DB2.
- Backend engineers who learned SQL on the job and want to fill the gaps left by informal training.
- Students in database courses who need a reference that connects classroom theory to real database implementations.
- Technical architects evaluating SQL compliance across database platforms for a migration or new project.
Table of contents
-
01
Relational Database Fundamentals
Establishes the relational model as the foundation for everything that follows, covering tables, keys, relationships, and why the relational approach dominates data management.
-
02
SQL Language Basics
Introduces SQL syntax conventions, data types, literals, operators, and the structure of a valid SQL statement across the major platforms.
-
03
Retrieving Data with SELECT
Covers the full SELECT statement including column expressions, WHERE filtering, ORDER BY, and the rules that govern result-set construction.
-
04
Joins and Multi-Table Queries
Explains inner joins, outer joins, cross joins, and self-joins with concrete examples showing how each join type affects the result set and where platform behavior diverges.
-
05
Subqueries and Set Operations
Teaches correlated and non-correlated subqueries, EXISTS, IN, and the set operators UNION, INTERSECT, and EXCEPT, with notes on platform support for each.
-
06
Aggregation, Grouping, and Window Functions
Covers GROUP BY, HAVING, aggregate functions, and the SQL window functions that underpin ranking, running totals, and moving averages in analytical queries.
-
07
Modifying Data
Details INSERT, UPDATE, DELETE, and MERGE syntax and semantics, including multi-row operations and the referential integrity constraints that govern data changes.
-
08
Stored Procedures, Triggers, and Functions
Walks through procedural SQL extensions across Oracle PL/SQL, T-SQL, and other dialects, showing how to write, deploy, and debug server-side logic.
-
09
Transaction Control and Concurrency
Explains ACID properties, isolation levels, locking behavior, and how to write transaction-safe code that avoids dirty reads, lost updates, and deadlocks.
-
10
Security, SQL/XML, and OLAP Extensions
Covers SQL privilege and role management, the SQL/XML standard for querying XML data relationally, and the OLAP grouping extensions used in reporting and analytics.
Frequently asked questions
What SQL standard does this book cover?
The book covers ANSI/ISO SQL from SQL-92 through the SQL:2003 standard. It notes which features were introduced in which revision and how each major platform implements or omits them.
Which database platforms are covered?
Oracle, Microsoft SQL Server, MySQL, PostgreSQL, and IBM DB2 are all covered throughout the book. Platform differences are called out explicitly rather than buried in footnotes.
Do I need prior SQL experience to use this book?
The early chapters build from first principles, so a complete beginner can work through it sequentially. Experienced practitioners will find the cross-platform reference sections and later chapters more immediately useful.
Is this book still relevant given it was published in 2008?
Core SQL syntax and the relational model it covers have not fundamentally changed. Platform-specific syntax details for very recent versions may differ, but this book remains authoritative for SQL foundations and standard compliance.
Does the book include exercises or sample code?
The text includes illustrative SQL examples throughout each chapter. It is structured as a reference rather than a workbook, so the primary focus is precise explanation rather than guided exercises.
Who is this book not for?
It is not the right starting point if you want a narrow, fast introduction to one specific database like MySQL or PostgreSQL. For that, a platform-specific beginner guide would get you productive faster.
You might also like
New
New
T-SQL Fundamentals
A complete foundation in Transact-SQL for SQL Server and Azure SQL development
New
SQL Cookbook
Problem-Solution Recipes for SQL Across Multiple Database Platforms
by Anthony Molinaro, Robert de Graaf