Gbase 8s内置函数之数学函数

Gbase 8s的内置函数包含标量函数、聚合函数、窗口函数以及其他的函数。

其中标量函数又包含数学函数、字符串函数、日期函数。

本次介绍数学函数及其使用例句:

Gbase 8s内置函数之数学函数

 

ABS

select abs(-5.6) as num1, abs(5.6) as num2 from dual;

CEIL/FLOOR/ ROUND

select ceil(5.6) as f_ceil, floor(5.6)as f_floor, round(5.6) as f_round from dual;

MOD

select mod(10, 3) as f_mod from dual;

POW/SQRT/ROOT

select pow(2, 3) as f_pow3, sqrt(25) as f_sqrt, root(64, 3) as f_root from dual;

EXP

select exp(1) as f_exp from dual;

LN/LOGN/LOG10

select ln(2.718281828459) as f_ln, logn(2.718281828459) as f_logn, log10(1000) as f_log10 from dual;

SIN/COS

select sin(1) as f_sin, cos(1) as f_cos from dual;

上一篇:最强最全面的大数据SQL经典面试题(由31位小伙伴共同协作完成)


下一篇:oracle时间查询 oracle定时任务备份数据