用to_char()函数
to_char(QueryDateTime,'hh24:mm:ss')>'08:30:00'

解决方案 »

  1.   

    select * from Mytable 
    where to_date(to_char(queryDateTime,'HH24:MI:SS'),'hh24:mi:ss')
    > to_date('18:18:55','HH24:MI:SS')
    通过了~
      

  2.   

    字符串之间是可以比较的,我们在应用当中经常这么做where to_char(QueryDateTime,'hh24:mi:ss')<'07:30:00'
    and to_char(QueryDateTime,'hh24:mi:ss')>'08:30:00'注意 mi 不要写成了mm
      

  3.   

    可以用 where ... between ..and ..
      

  4.   

    字符串比较是逐个按ASCII吗来比较的。
      

  5.   

    select 
        * 
    from 
        table1 a 
    where
            1=1
        and to_char(a.时间字段,'hh24:mi:ss')>='08:30:00' 
        and to_char(a.时间字段,'hh24:mi:ss')<='17:30:00'
      

  6.   

    按照字符串比较的时候的确是从第一位开始根据ASCII来比较的。