O'Reilly logo

Oracle Database 10g: The Complete Reference by Kevin Loney

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 16DECODE and CASE: if, then, and else in SQL

The DECODE function is without doubt one of the most powerful in Oracle’s SQL. It is one of several extensions Oracle added to the standard SQL language. This chapter will explore a number of ways that DECODE can be used, including the generation of “crosstab” reports. You can also use the CASE function and the COALESCE function to execute complex logical tests within your SQL statements.

This is an advanced and often difficult chapter. Most of what is illustrated here is unnecessary for the vast majority of reporting; don’t be concerned if it seems beyond your needs. Its real value is more for sophisticated reporting and programming.

if, then, else

In programming and logic, a common construction ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required