select roomno from cusorder where 
trunc(orderdate)=to_date('02-jan-03','yy-mon-dd')

解决方案 »

  1.   

    怎么你问的问题与
    http://expert.csdn.net/Expert/topic/1220/1220133.xml?temp=.3520624
    一样
      

  2.   

    因为日期型包括日期时间型,把它改成以下:select roomno from cusorder where trunc(orderdate,'dd')=to_date('02-jan-03','yyyy-mm-dd')
      

  3.   

    不应当的
    orderdate是什么类型的
      

  4.   

    select roomno from cusorder where to_date(orderdate,'dd-mon-yy')='01-JAN-03';this is the answer
      

  5.   

    除非你的orderdate不是日期类型
    就要用
    select roomno from cusorder where to_date(orderdate,'dd-mon-yy')='01-JAN-03';
    这种办法