解决方案 »

  1.   

    DateReservation>'2013-01-01' and DateReservation<'20013-12-31' 
      

  2.   

    Select * from PeisOrgReservation where DateReservation>'2013-01-01' and DateReservation<'2013-12-31'
      

  3.   


    Select * 
     from PeisOrgReservation 
     where DateReservation>cast('2013-1-1' as smalldatetime)
     and DateReservation<cast('2013-12-31' as smalldatetime)
      

  4.   

    数据类型smalldatetime的日期范围是1900-01-01到2079-06-06
    参考 http://technet.microsoft.com/zh-cn/library/ms182418(v=sql.105).aspxLZ原语句中,日期的年份中多了1个0喔.
    Select * from PeisOrgReservation where DateReservation>'2013-1-1' and DateReservation<'20013-12-31' 
      

  5.   

    前辈,我还想请教下,我要在查询出来的结果的基础上再查询BasExamFeeItem表的ExamFeeItem_Name字段sql语句该怎么写啊,能不能再指点下啊
      

  6.   

    怎么关联啊前辈,我才学数据库,知道这个概念但是不会用啊,我后面那句查询是这样写的
    select * from BasExamFeeItem where (ExamFeeItem_Name='内科')怎么把他和刚刚那句查询关联进行查询啊?