Oracle數(shù)學(xué)相關(guān)函數(shù)小結(jié)
本文總結(jié)了Oracle數(shù)學(xué)相關(guān)函數(shù)。分享給大家供大家參考,具體如下:
1.絕對(duì)值:abs()
select abs(-2) value from dual;
2.取整函數(shù)(大):ceil()
select ceil(-2.001) value from dual;(-2)
3.取整函數(shù)(?。篺loor()
select floor(-2.001) value from dual;(-3)
4.取整函數(shù)(截?。簍runc()
select trunc(-2.001) value from dual; (-2)
5.四舍五入:round()
select round(1.234564) value from dual;(1.2346)
6.取平方:Power(m,n)
select power(4,2) value from dual;(16)
7.取平方根:SQRT()
select sqrt(16) value from dual;(4)
8.取隨機(jī)數(shù):dbms_random(minvalue,maxvalue)
select sys.dbms.random.value(0,1) value from dual;
9.取符號(hào):Sign()
select sign(-3) value from dual;(-)
10,取集合的最大值:greatest(value)
select greatest(-1,3,5,7,9) value from dual;(9)
11.取集合的最小值:least(value)
select least(-1,3,5,7,9) value from dual;(-1)
12.處理Null值:nvl(空值,代替值)
select nvl(null,10) value from dual;(10)
13.求字符序號(hào):ascii()
select ascii(a) value from dual;
14.求序號(hào)字符:chr()
select chr(97) value from dual;
15.鏈接:concat()
select concat("11","22") value from dual;(1122)
16.獲取系統(tǒng)時(shí)間:sysdate()
select sysdate value from dual;
17.求日期
select trunc(sysdate) from dual;
18.求時(shí)間
select to_char(sysdate,"hh24:mm:ss") from dual;
19.首字母大寫:InitCAP()
select INITCAP(abc def ghi) value from dual;(Abc Def Ghi)
希望本文所述對(duì)大家Oracle數(shù)據(jù)庫(kù)程序設(shè)計(jì)有所幫助。
- oracle 存儲(chǔ)過程和函數(shù)例子
- ORACLE常用數(shù)值函數(shù)、轉(zhuǎn)換函數(shù)、字符串函數(shù)
- Oracle中instr函數(shù)使用方法
- 給Oracle添加split和splitstr函數(shù)的方法
- oracle to_char函數(shù)將number轉(zhuǎn)成string
- Oracle round()函數(shù)與trunc()函數(shù)區(qū)別介紹
- Oracle隨機(jī)函數(shù)之dbms_random使用詳解
- ORACLE時(shí)間函數(shù)(SYSDATE)深入理解
- Oracle to_date()函數(shù)的用法介紹
- oracle中的trim函數(shù)使用介紹
- Oracle to_char函數(shù)的使用方法
- Oracle 中XML處理函數(shù)介紹
- Oracle 函數(shù)大全
相關(guān)文章
Oracle中實(shí)現(xiàn)行列互轉(zhuǎn)的方法分享
這篇文章主要為大家總結(jié)了Oracle中實(shí)現(xiàn)行列互轉(zhuǎn)的簡(jiǎn)單方法,文中的示例代碼講解詳細(xì),具有一定的借鑒價(jià)值,感興趣的小伙伴可以跟隨小編一起學(xué)習(xí)一下2023-06-06詳解Oracle 中實(shí)現(xiàn)數(shù)據(jù)透視表的幾種方法
這篇文章主要介紹了詳解Oracle 中實(shí)現(xiàn)數(shù)據(jù)透視表的幾種方法,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-04-04Linux系統(tǒng)下Oracle數(shù)據(jù)庫(kù)的安裝和啟動(dòng)關(guān)閉操作教程
這篇文章主要介紹了Linux系統(tǒng)下Oracle數(shù)據(jù)庫(kù)的安裝和啟動(dòng)關(guān)閉操作教程,并針對(duì)在sqlplus下所需執(zhí)行的命令進(jìn)行講解,需要的朋友可以參考下2015-12-12Oracle密碼過期如何取消密碼180天限制及密碼180天過期,賬號(hào)鎖住的問題
這篇文章主要介紹了Oracle密碼過期如何取消密碼180天限制及密碼180天過期,賬號(hào)鎖住的問題,需要的朋友可以參考下2018-12-12Oracle與Mysql自動(dòng)增長(zhǎng)列(id)的區(qū)別
這篇文章主要介紹了Oracle與Mysql自動(dòng)增長(zhǎng)列(id)的區(qū)別,需要的朋友可以參考下2014-01-01Oracle連接遠(yuǎn)程數(shù)據(jù)庫(kù)的四種方法
這篇文章主要為大家詳細(xì)介紹了Oracle連接遠(yuǎn)程數(shù)據(jù)庫(kù)的四種設(shè)置方法和注意事項(xiàng),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-05-05Oracle基礎(chǔ)多條sql執(zhí)行在中間的語句出現(xiàn)錯(cuò)誤時(shí)的控制方式
今天小編就為大家分享一篇關(guān)于Oracle基礎(chǔ)多條sql執(zhí)行在中間的語句出現(xiàn)錯(cuò)誤時(shí)的控制方式,小編覺得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來看看吧2018-12-12