3
Copyright © Oracle Corporation, 2001. All rights
reserved.
单行函数
3-2
Copyright © Oracle Corporation, 2001. All rights
reserved.
目标
通过本章学习,您将可以 :
•
SQL 中不同类型的函数。
•
在 SELECT 语句中使用字符,数字和日期函数。
•
描述转换型函数的用途。
3-3
Copyright © Oracle Corporation, 2001. All rights
reserved.
SQL 函数
Function
Function
Input
arg 1
arg 1
arg 2
arg 2
arg
arg
n
n
Function
performs action
Output
Result
Result
value
value
3-4
Copyright © Oracle Corporation, 2001. All rights
reserved.
两种 SQL 函数
Functions
Functions
Single-row
Single-row
functions
functions
Multiple-row
Multiple-row
functions
functions
3-5
Copyright © Oracle Corporation, 2001. All rights
reserved.
单行函数
单行函数 :
•
操作数据对象
•
接受函数返回一个结果
•
只对一行进行变换
•
每行返回一个结果
•
可以转换数据类型
•
可以嵌套
•
参数可以是一列或一个值
function_name [(arg1, arg2,...)]