Practical SQL: The Sequel

Book Review

Practical SQL: The Sequel
by Judith S. Bowman
Copyright 2001
Addison Wesley

Practical SQL: The Sequel Find out more about this book,
or purchase it, from

This book is really interesting, and a bit different from most of the SQL language “how-to” books that I have read in the past. In fact, the book is somewhat hard to describe. Essentially, the book teaches you how to code SQL for the “real world”. Notice that I said “SQL”, not “Transact-SQL”. What the author has tried to do is write a book that covers the “common base” of the various SQL dialects, including SQL for Informix, Oracle, Microsoft SQL Server, and Sybase Adaptive Server.

The most interesting part of the book is that it is not organized around the SQL language, which is what you find with most other books. Instead, it is organized around how the SQL language is used in the real word. Below I list the book’s chapters, along with its major topics. I think this best describes what the book covers.

  • Chapter 1: Introduction. Introductory material, including a description of the various SQL engines and dialects discussed in the book.

  • Chapter 2: Handling Dirty Data. Learn how to use SQL to standardize case, remove extra spaces, select string length by size, match or find patterns, find words that sound like other words, and work with dates.

  • Chapter 3: Translating Values: Learn how to change or translate values using SQL. You learn about using CASE, handling NULLs, dealing with point functions, and performing UNIONs, joins, and subqueries.

  • Chapter 4: Managing Multiples. Learn how to find duplicates and near-duplicates, locate disconnected rows, counting items based on characteristics, and figuring distribution.

  • Chapter 5: Navigating Numbers: Learn the pros and cons of various auto-numbering options, how to locate the high value, how to create row numbers, finding the top number of rows, how to pick every nth row, and how to generate a running total.

  • Chapter 6: Tuning Queries: A good chapter on the basics of tuning queries, probably one of the best I have seen in any book.

  • Chapter 7: Using SQL to Write SQL. Getting SQL to write SQL code is a very useful in many applications, and this is the first book that I have run across that shows you how to do it. In many ways, this chapter itself it worth the price of this book.

As you can see from the topics discussed, this book is not a SQL tutorial. Instead, it takes a look at some typical real world situations and shows you how to write the appropriate SQL to get the job done. If you are new to SQL, I would recommend reading this book after first having mastered the basics of SQL.

As I mentioned earlier, the book covers SQL in a generic way, so if you develop SQL for multiple back-end databases, then you will find this book very useful. Most of the many code examples in the book work on any of the major database engines. And for those few cases where it doesn’t, the author explain the differences between the various dialects of code.

I recommend this book for anyone who programs in SQL on a daily basis, especially those of you who are still trying to master the language, or those developers who have to write SQL code to run on a variety of different database engines.


No comments yet... Be the first to leave a reply!