
Copyright Oracle Corporation, 1999. All rights reserved.
3
3
Single-Row Functions

3-2
Copyright Oracle Corporation, 1999. All rights reserved.
Objectives
After completing this lesson, you should
After completing this lesson, you should
be able to do the following:
be able to do the following:
•
Describe various types of functions
available in SQL
•
Use character, number, and date
functions in SELECT statements
•
Describe the use of conversion
functions

3-3
Copyright Oracle Corporation, 1999. All rights reserved.
SQL Functions
Function
Function
Input
Input
arg 1
arg 1
arg 2
arg 2
arg
arg
n
n
Function
Function
performs action
performs action
Output
Output
Result
Result
value
value

3-4
Copyright Oracle Corporation, 1999. All rights reserved.
Two Types of SQL Functions
Functions
Functions
Single-row
Single-row
functions
functions
Multiple-row
Multiple-row
functions
functions

3-5
Copyright Oracle Corporation, 1999. All rights reserved.
Single-Row Functions
•
Manipulate data items
•
Accept arguments and return one value
•
Act on each row returned
•
Return one result per row
•
May modify the datatype
•
Can be nested
function_name (column|expression, [arg1, arg2,...])