若表Tab1的字段F1为TimeStamp型,下面语句如何才对?
select * from Tab1 where F1 between '2002-9-9' and '2002-10-9'

解决方案 »

  1.   

    SQL> select exittime from exitvehicleflow
      2  where exittime between to_timestamp('2002-9-9 1:00:00','yyyy-mm-dd hh24:mi:ss') 
      3  and to_timestamp('2002-9-11 12:00:00','yyyy-mm-dd hh24:mi:ss') ;
    and to_timestamp('2002-9-11 12:00:00','yyyy-mm-dd hh24:mi:ss')
        *
    ERROR 位于第 3 行:
    ORA-00904: 无效列名???怎么办?????
      

  2.   

    Oracle 好象没有TimeStamp,只有Date类型。
      

  3.   

    这样试试:
    select exittime from exitvehicleflow
    where exittime between to_date('2002-9-9 1:00:00','yyyy-mm-dd hh24:mi:ss')  and to_date('2002-9-11 12:00:00','yyyy-mm-dd hh24:mi:ss');