如题 
找了半天,好像没找到很好的解决办法。

解决方案 »

  1.   

    不明白什么意思
    单纯的模糊查询,用like或者
    charindex函数就可以做到了
      

  2.   

    如果是只取年月日,那就用convert(varchar(10),date,120) 转换呗
      

  3.   

    貌似时间是数字 而like是查字符串的
      

  4.   

    select * from tablename where my_time ='2007-1-1'
    这个查到的就是某日的信息
      

  5.   

    year(数据库日期字段)获取年
    month(数据库日期字段)获取月
    day(数据库日期字段)获取日
    ······
      

  6.   

    想查询某日的就
    select * from table where date(colName)=@date
    年的
    select * from table where year(colName)=@year
    月的
    select * from table where month(colName)=@month