摘要: (1)--取系统当前日期 select sysdate from dual; (2)--加月 select add_months(sysdate,2) from dual; --减月 select add_months(sysdate,-2) from dual; (3)--求当月最后一天 select last_day(sysdate) from dual; select last_day(s... 阅读全文
posted @ 2018-11-22 22:23 学亮编程手记 阅读(146) 评论(0) 推荐(0) 编辑
摘要: (1)--转换函数 --数字转换字符串 select to_char(100)||'分' from dual; select 100||'' from dual; (2)--日期转字符串 select to_char(sysdate,'yyyy-mm-dd') from dual; select to_char(sysdate,'yyyy')||'年'||to_char(sysdate,'mm'... 阅读全文
posted @ 2018-11-22 22:22 学亮编程手记 阅读(171) 评论(0) 推荐(0) 编辑
摘要: --数值函数 --四舍五入 select round(100.23456789,3) from dual select round(100.5,2) from dual --数字截取 select trunc(100.23856,2) from dual --取模 select mod(10,3) from dual 阅读全文
posted @ 2018-11-22 21:55 学亮编程手记 阅读(148) 评论(0) 推荐(0) 编辑
摘要: --字符函数 --伪表dual --(1)求字符串长度 select length('123.456/-*') from dual --(2)截取函数求字符串的子串 select substr('ABCDEF',2,2) from dual --(3)字符串拼接 select concat('ABC','DE') from dual select concat(concat('ABC','DE'... 阅读全文
posted @ 2018-11-22 21:38 学亮编程手记 阅读(260) 评论(0) 推荐(0) 编辑