Chapter 5. Common Query Patterns

In this chapter we introduce recipes to handle many common query patterns, often for the sort of problems that you know should have an elegant solution, but for which no obvious SQL command or operator exists. Whether it's predicting the trend in data for extrapolation and planning purposes, paginating your data for display on a web site, or finding lost text in your database, you'll find a recipe to suit you in this chapter.

Many of the problems we address here have multiple solutions. Where space allows, we've tried to cover as many options as possible. Having said that, if you invent or know of a different approach, consider yourself a budding SQL chef too!

Changing Nulls into Real Values

Problem

You want to substitute ...

Get Oracle SQL Recipes: A Problem-Solution Approach 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.