玖叶教程网

前端编程开发入门

oracle date_sub函数用法(oracle函数to_date)


名词解释:

date_sub(current_date,N) 取当前日期N天前的数据

select * from a where ymd between date_sub(current_date,10) and  date_sub(current_date,3) ;

上述sql表示查询当前日期前3天至前十天的数据。

发表评论:

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言