Chapter 15. SQL Tricks

This chapter describes how to solve common problems with SQL programs that

  • Contain nonobvious or clever combinations of standard SQL elements, or

  • Use nonstandard (DBMS-specific) SQL elements that obviate the need for convoluted solutions in standard SQL

I call these queries tricks, but they’re actually part of the arsenal of any experienced SQL programmer. You can find deeper descriptions of the query techniques used in this chapter in the books listed in the “Advanced SQL Books” sidebar.

Get SQL: Visual QuickStart Guide, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.