Chapter 4

Functions

This chapter is designed to introduce more utilitarian features into the SELECT statement and to show the application of these enhancements. You can use some of the information introduced in this chapter for checking the feasibility of outputs. As we have seen, SQL does not prevent programmers from asking questions that have very long or even meaningless answers (see, for example, our discussion of Cartesian products in Chapter 3).

The main thrust of this chapter is to introduce functions and to demonstrate how to find information when a row contains strings. Functions come in two general varieties: aggregate functions (such as COUNT or SUM) and row functions (such as SQRT). We will place special emphasis on string functions ...

Get Practical Guide to using SQL in Oracle now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.