标签:class 数字 log height strong 数值 选项 开始 its
select trunc(sysdate) from dual; --2017/11/7 今天的日期为2017-11-07 select trunc(sysdate, ‘mm‘) from dual; --2017/11/1 返回当月第一天. select trunc(sysdate,‘yy‘) from dual; --2017/1/1 返回当年第一天 select trunc(sysdate,‘dd‘) from dual; --2017/11/7 返回当前年月日 select trunc(sysdate,‘yyyy‘) from dual; --2017/1/1 返回当年第一天 select trunc(sysdate,‘d‘) from dual; --2017/11/5 (星期天)返回当前星期的第一天 select trunc(sysdate, ‘hh‘) from dual; --2017/11/7 17:00:00 当前时间为17:34 select trunc(sysdate, ‘mi‘) from dual; --2017/11/7 17:34:00 TRUNC()函数没有秒的精确
select trunc(123.458) from dual; --123 select trunc(123.458,0) from dual; --123 select trunc(123.458,1) from dual; --123.4 select trunc(123.458,-1) from dual; --120 select trunc(123.458,-4) from dual; --0 select trunc(123.458,4) from dual; --123.458 select trunc(123) from dual; --123 select trunc(123,1) from dual; --123 select trunc(123,-1) from dual; --120
select round(123.456) from dual; --123 select round(123.456,0) from dual; --123 select round(123.456,1) from dual; --123.5 select round(123.456,2) from dual; --123.46 select round(123.456,-1) from dual; --120 select round(123.456,-2) from dual; --100 select round(123,1) from dual; --123 select round(123,-1) from dual; --120
标签:class 数字 log height strong 数值 选项 开始 its
原文地址:http://www.cnblogs.com/tonghaolang/p/7800272.html