--可以先把整型和日期类型的数据转换成字符串型再作模糊查询:
select * from talbename where convert(varchar,intcol) like '200%'select * from tablename where substring(convert(varchar(8),datetimecol,112),5,2) in ('07','08','12')
select * from talbename where convert(varchar,intcol) like '200%'select * from tablename where substring(convert(varchar(8),datetimecol,112),5,2) in ('07','08','12')
还有取一部分,这样的效率高
比如你要查5月的记录select * from tb where datapart(day,时间字段) = 5
select * from 表 where convert(varchar,数字) like '200%'