叽哩咕噜

君子如玉,上善若水

oracle 的一PL/SQL 函数大全

1.字符函数
 
chr(int)             返回ASCII码
count(string,string) 连接两字符串
initcap(string)      首字母变大写
lower(string)        转换成小写
upper(string)        转换成大写
lpad(string,count[,char]) 在左边添加N个字符或空格
rpad(string,count[,char]) 在右边添加N个字符或空格
ltrim(string[,char])  去掉串中左边的字符或是空格
rtrim(string[,char])   去掉串中右边的字符或是空格
replace(string,char[,char]) 替换字符串或是删除字符串
substr(string,start[,count]) 截取字符串
length(string)          串长度

2.数字函数

abs(value)             绝对值
ceil(value)            大于或等于 的最小整数
floor(v)               小于或等于 的最大整数
cos(v)                 余弦值
cosh(v)                反余弦值
exp(v)                 e为底的指数值
ln(v)                  自然对数
log(v)                 10为底的对数
power(v,exponent)      指数值
round(value,p)         四舍五入
mod(v,divisor)         取余
sort(v)                平方根

3.日期函数

add_months(date,count)    增加count月后的日期
last_day(date)            月末日期
months_between(date1,date2)两日期之间的间隔月份
new_time(date,'this','other')转换时区时间
next_day(date,'day')       星期几的日期
sysdate()                  系统日期
current_timestamp()        当前的时间和日期


4.转换函数

to_char(date,'format')      转换成字符串
to_number(char)             转换成数字
to_date(string,'format')    转换成指定格式的日期
chartorowid(char)           字符串转换成rowid
rowidtochar(x)              rowid转换成字符


posted on 2009-05-26 19:18 叽哩咕噜 阅读(595) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航:
 

公告

疯狂

导航

<2009年5月>
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

统计

常用链接

留言簿

随笔分类(17)

随笔档案(22)

文章分类(1)

文章档案(1)

工程教程

牛人BLOG

搜索

最新评论

阅读排行榜

评论排行榜