select * from tb where convert(varchar,date)like '2005%'
这样应该可以

解决方案 »

  1.   

    对时间是不允许用like select * from tb where date datepart(year,时间字段)=2005
      

  2.   

    select *from UserTable where timeCreateDate like '%2003%'
      

  3.   

    --上面写错了,这个才是
    select * from tb where datepart(year,时间字段)=2005
      

  4.   


    select * from tb where convert(varchar(100),insert_time,21) like '2005%'
      

  5.   

    select * from tb where convert(varchar(10),date,120) like '2005%'