首页 > 技术文章 > sql条件查询-日期比较(取年月部分)

xtreme 2014-03-31 18:23 原文

查询当年当月的数据:

select * from compalete_task
where to_Char(create_date,'yyyyMM') = to_Char(sysdate,'yyyyMM')
order by create_date desc;

推荐阅读