declare @date char(7)
set @date = '2003-08'
select * from info
where convert(char(7),YourDateColumn,120) = @date
set @date = '2003-08'
select * from info
where convert(char(7),YourDateColumn,120) = @date
调试欢乐多
set @date = '2003-08'
select * from info
where convert(char(7),YourDateColumn,120) = @date
set @date = '2003-08'
set @date=@date & '-01'
select * from info where datadiff(mm,YourDateColumn,@date)=0
where convert(char(7),YourDateColumn,120) = 'YYYY-MM'