oracle如何获取当年第一月,如今年是2015年,则需获取 201501

当年第一个月 SQL> select to_char(sysdate,'yyyy')||'01' from dual;
TO_CHA ------ 201501
当前年,月 SQL> select to_char(sysdate,'yyyymm') from dual;
TO_CHA ------ 201503

posted on 2015-12-01 23:42  struggle_beiJing  阅读(2013)  评论(0)    收藏  举报

导航