Database Reference
In-Depth Information
Figure 9.16
Using the
TRUNC,
DECODE, and
TO_DATE
Functions.
Note how amounts in Figure 9.16 are truncated and then $100 is added
to the amount. This expression is then used as the search parameter in the
DECODE function.
Note: Using functions in the WHERE clause will hurt performance unless
function-based indexes are used. However, be aware of overindexing with
function-based indexes. Creating too many indexes can hurt performance
as well. The best option is not to use functions in the WHERE clause, other
than with literal values, if possible.
Once again, further details on Oracle SQL single-row functions can be
found in Oracle documentation both online and in Oracle software docu-
mentation. Specific reference details of all functions can be found in the SQL
Reference Manual section under the Oracle documentation list of topics.
Search WWH ::




Custom Search