round(M,N):对M保留N位小数,四舍五入。例如:
select round(3.145, 2) from dual
mod(a,b):求余/求模函数。例如:
select mod(3, 2) from dual;
to_char(date,'format'):将数值型或者是日期类型转化为字符串格式。例如:
select TO_CHAR(sysdate,'YYmmDD') from dual;
to_date(char,'format'):将字符串类型转化为日期类型格式。例如:
select to_date('2018-06-06 11:13:11','yyyy-mm-dd hh:mi:ss') from dual
如果日期格式含有中文,就要使用双引号引起来。例如
select to_date('1980年12月17日','yyyy"年"mm"月"dd"日"') from dual;
字符串拼接符:||
select 'Hello'||'World' from dual;
concat(str,str):将两个字符串进行拼接:
select CONCAT('Hello', 'World') from dual;
nvl(a,b):如果a为空值则转化为b,否则依然为a:
select nvl(null,0) from dual;