oracle 时间类型查询

来源:百度知道 编辑:UC知道 时间:2024/07/14 03:42:24
请问如何查询 从什么时候开始的
和 到什么时间结束的
还有从大什么时间之间的数据呢

where trunc(sysdate)>= to_date('2009-1-1','yyyy-MM-dd')
and trunc(sysdate)<= to_date('2009-10-1','yyyy-MM-dd')
oracle中时间比较特殊,所以在使用的时候就要对时间进行转化才可以使用的

where trunc(sysdate)>= to_date(A)
and trunc(sysdate)<= to_date(B)

where time between #date1# and #date2#;