select * from data where 时间 between '2002-03-01' and '2002-03-06'从2002-03-01 00:00:00 到 2002-03-06 00:00:00之间的数据都可以查到

解决方案 »

  1.   

    select * from data where 时间>='2002-03-01 12:00:00' and 时间<='2002-03-05 12:00:00'
      

  2.   

    日期型可以直接比较的呀!
    上面的朋友们,写的都有问题
    “时间”是data型的这样怎么能比较?
    select *
    from data
    where date >= to_date('03/01/2003 12:00:00','mm/dd/yyyy hh24:mi:ss')
       and date <= to_date('03/05/2003 12:00:00','mm/dd/yyyy hh24:mi:ss');
      

  3.   

    select * from data where 时间 between '2002-03-01' and '2002-03-06'