Database Reference
In-Depth Information
Note:
Placing functions in WHERE and ORDER BY clauses can be detri-
1
mental to performance.
There are so many single-row functions that there is not room to cover
them all in this chapter. However, you will gain experience with the com-
monly used functions. Other more obscure functions are detailed in Oracle
documentation. Single-row functions can be subdivided into the following
categories:
Character or String Functions
. Functions that require a character
value or string as input (see Figure 9.1).
Number Functions
. Functions that require a number as input.
Most of these return a number. For example, the SIGN function
returns -1 if the number is negative, 0 if it is zero, and 1 if it is posi-
tive (see Figure 9.2).
Binary Floating-Point Number Functions
. These func-
tions are new to Oracle Database 10
and could possibly be
viewed as a subset of number functions, except that they operate
specifically on binary floating-point numbers (see Figure 9.2).
g
Datetime Functions
. Functions that require a date value as input
(see Figure 9.3).
Conversion Functions
. Functions that convert one datatype to
another. For example, the TO_CHAR function can convert a date or
number to a character value (see Figure 9.4).
Miscellaneous Functions
. Functions that perform unusual tasks. For
example, the DECODE function acts like an IF-THEN-ELSE con-
struct or CASE statement (see Figure 9.5).
Figures 9.1 through 9.5 show all the different types of single-row func-
tions. Functions highlighted and marked with an asterisk (
) in
each figure are discussed in this chapter. Additionally, many functions are
referred to in other chapters.
*INITCAP
 
Search WWH ::




Custom Search