17,092
社区成员
发帖
与我相关
我的任务
分享
select * from tbl
where date1 >= to_date('2008-12-22', 'yyyy-mm-dd')
and date1 <= to_date('2008-12-22', 'yyyy-mm-dd')
楼主为什么不直接用:
select * from tbl
where to_char(date1,'yyyy-mm-dd') = '2008-12-22';
select * from tbl
where date1 >= to_date('2008-12-22', 'yyyy-mm-dd')
and date1 <= to_date('2008-12-22', 'yyyy-mm-dd')+0.99999