如题
找了半天,好像没找到很好的解决办法。
------解决方案--------------------------------------------------------
你想怎么个模糊?
------解决方案--------------------------------------------------------
不明白什么意思
单纯的模糊查询,用like或者
charindex函数就可以做到了
------解决方案--------------------------------------------------------
你喜欢偷拍?!
------解决方案--------------------------------------------------------
select * from tablename where my_time ='2007-1-1'
这个查到的就是某日的信息
------解决方案--------------------------------------------------------
year(数据库日期字段)获取年
month(数据库日期字段)获取月
day(数据库日期字段)获取日
······
------解决方案--------------------------------------------------------
datename(date,getdate())
------解决方案--------------------------------------------------------
帮顶啊
------解决方案--------------------------------------------------------
想查询某日的就
select * from table where date(colName)=@date
年的
select * from table where year(colName)=@year
月的
select * from table where month(colName)=@month