Oracle 常用函式

2021-06-06 09:47:26 字數 550 閱讀 7844

select power(3,2)平方 from dual 

select round(1000.24432,3)取精度 from dual

select floor(1000.54432)取下限不計較四捨五入 from dual

select ceil(1000.04432)取上限不計較四捨五入 from dual

select trunc(1000.24632,2)擷取小數點後幾位無四捨五入 from dual

select abs(-2)取絕對值 from dual 

select to_char(sysdate,'yyyy-mm-dd hh:mi:ss')把日期轉換成特定字串 from dual

select to_date('2010-12-06','yyyy-mm-dd')將字串轉換成日期型別 from dual

select to_number('4')把字串轉換成數字 from dual

select sqrt(to_number('100'))字串轉換成數字求算術平方根 from dual

Oracle常用函式

一 row number over 資料甲 1 select column name column name,data type,2 row number over partition by column name order by column name row num 3 from test c...

Oracle常用函式

數學函式 1.絕對值 o select abs 1 value from dual 2.取整 大 o select ceil 1.001 value from dual 3.取整 小 o select floor 1.001 value from dual 4.取整 擷取 o select trun...

oracle常用函式

1.concat c1,c2均為字串,函式將c2連線到c1的後面,如果c1為null,將返回c2.如果c2為null,則返回c1,如果c1 c2都為null,則返回null。他和操作符 返回的結果相同 select concat slobo svoboda username from dualuse...