1.字符函數(shù)
chr(int) 返回ASCII碼
count(string,string) 連接兩字符串
initcap(string) 首字母變大寫(xiě)
lower(string) 轉(zhuǎn)換成小寫(xiě)
upper(string) 轉(zhuǎn)換成大寫(xiě)
lpad(string,count[,char]) 在左邊添加N個(gè)字符或空格
rpad(string,count[,char]) 在右邊添加N個(gè)字符或空格
ltrim(string[,char]) 去掉串中左邊的字符或是空格
rtrim(string[,char]) 去掉串中右邊的字符或是空格
replace(string,char[,char]) 替換字符串或是刪除字符串
substr(string,start[,count]) 截取字符串
length(string) 串長(zhǎng)度
2.數(shù)字函數(shù)
abs(value) 絕對(duì)值
ceil(value) 大于或等于 的最小整數(shù)
floor(v) 小于或等于 的最大整數(shù)
cos(v) 余弦值
cosh(v) 反余弦值
exp(v) e為底的指數(shù)值
ln(v) 自然對(duì)數(shù)
log(v) 10為底的對(duì)數(shù)
power(v,exponent) 指數(shù)值
round(value,p) 四舍五入
mod(v,divisor) 取余
sort(v) 平方根
3.日期函數(shù)
add_months(date,count) 增加count月后的日期
last_day(date) 月末日期
months_between(date1,date2)兩日期之間的間隔月份
new_time(date,'this','other')轉(zhuǎn)換時(shí)區(qū)時(shí)間
next_day(date,'day') 星期幾的日期
sysdate() 系統(tǒng)日期
current_timestamp() 當(dāng)前的時(shí)間和日期
4.轉(zhuǎn)換函數(shù)
to_char(date,'format') 轉(zhuǎn)換成字符串
to_number(char) 轉(zhuǎn)換成數(shù)字
to_date(string,'format') 轉(zhuǎn)換成指定格式的日期
chartorowid(char) 字符串轉(zhuǎn)換成rowid
rowidtochar(x) rowid轉(zhuǎn)換成字符