oracle

要求查询出tab中3月1-10号的每天1-10点数据

 

select * from tab where (to_number(to_char(date,'hh'),'99') between 1 and 10)

and date between to_date('2012-3-1','yyyy-mm-dd') and to_date('2012-3-10')

posted on 2012-03-09 13:19  it_code  阅读(122)  评论(0编辑  收藏  举报