PL/SQL User's Guide and Reference

Contents Index Home Previous Next

Built-In Functions

PL/SQL provides more than 75 powerful functions to help you manipulate data. These built-in functions fall into the following categories:

Table 2 - 4 shows the functions in each category.

You can use all the functions in SQL statements except the error- reporting functions SQLCODE and SQLERRM. Also, you can use all the functions in procedural statements except the miscellaneous functions DECODE, DUMP, and VSIZE.

Note: The SQL group functions AVG, MIN, MAX, COUNT, SUM, STDDEV, and VARIANCE are not built into PL/SQL. Nevertheless, you can use them in SQL statements (but not in procedural statements).

For descriptions of the error-reporting functions, see Chapter 10. For descriptions of the other functions, see Oracle7 Server SQL Reference.

Error Number Character Conversion Date Misc
SQLCODE ABS ASCII CHARTOROWID ADD_MONTHS DECODE
SQLERRM ACOS CHR CONVERT LAST_DAY DUMP
ASIN CONCAT HEXTORAW MONTHS_BETWEEN GREATEST
ATAN INITCAP RAWTOHEX NEW_TIME GREATEST_LB
ATAN2 INSTR ROWIDTOCHAR NEXT_DAY LEAST
CEIL INSTRB TO_CHAR ROUND LEAST_LB
COS LENGTH TO_DATE SYSDATE NVL
COSH LENGTHB TO_LABEL TRUNC UID
EXP LOWER TO_MULTI_BYTE USER
FLOOR LPAD TO_NUMBER USERENV
LN LTRIM TO_SINGLE_BYTE VSIZE
LOG NLS_INITCAP
MOD NLS_LOWER
POWER NLS_UPPER
ROUND NLSSORT
SIGN REPLACE
SIN RPAD
SINH RTRIM
SQRT SOUNDEX
TAN SUBSTR
TANH SUBSTRB
TRUNC TRANSLATE
UPPER
Table 2 - 4. Built-in Functions


Contents Index Home Previous Next