查询两个日期(时间)以内的数据,between and 或 and 连>= <=,to_date()

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了查询两个日期(时间)以内的数据,between and 或 and 连>= <=,to_date()相关的知识,希望对你有一定的参考价值。

between and 方法 

Sql代码  技术分享
  1. select * from kk.kkhmd where larq between(to_date(‘2008-9-3‘,‘yyyy-mm-dd‘)) and (to_date(‘2008-9-5‘,‘yyyy-mm-dd‘))  



用and连接 >= <= 方法 

Sql代码  技术分享
    1. select * from kk.kkhmd where larq>=to_date(‘2008-9-3‘,‘yyyy-mm-dd‘) and larq <=to_date(‘2008-9-5‘,‘yyyy-mm-dd‘)  

转载至:http://heisetoufa.iteye.com/blog/239718

以上是关于查询两个日期(时间)以内的数据,between and 或 and 连>= <=,to_date()的主要内容,如果未能解决你的问题,请参考以下文章