select sum(overtime_totaltime) as cnt
from overtime
where year(overtime_date)=2002 and month (overtime_date )=11 and overtime_id ='g057'
from overtime
where year(overtime_date)=2002 and month (overtime_date )=11 and overtime_id ='g057'
from overtime
where overtime_date >='2002/11/1' and overtime<'2002/12/1' and overtime_id ='g057'
from overtime
where left(convert(char(8),overtime_date,112),6)='200211'
and overtime_id ='g057'
go
from overtime
where convert(char(6),overtime_date,112)='200211'
and overtime_id ='g057'
为什么要多用一个LEFT?
from overtime
where left(convert(char(8),overtime_date,112),6)='200211'
and overtime_id ='g057'
from overtime
where year(overtime_date)=2002 and month (overtime_date )=11 and overtime_id ='g057'还是 sky_blue 简单明了