select count(1) from tb where datediff(dd,addtime,getdate())=0
select convert(varchar(10),addtime,120),count(*) from tb group by convert(varchar(10),addtime,120)
select convert(varchar(10),addtime,120),count(1) from tb group by convert(varchar(10),addtime,120)
select convert(varchar(10),addtime,120),count(1) from tb where datediff(dd,addtime,getdate())>=0 group by convert(varchar(10),addtime,120)
select count(1) from tb where datediff(dd,addtime,getdate())=0和select convert(varchar(10),addtime,120),count(1) from tb where datediff(dd,addtime,getdate())>=0 group by convert(varchar(10),addtime,120) 区别是??
from tb
group by convert(varchar(10),addtime,120)
convert(varchar(10),addtime,120),count(1)
from
tb
group by
convert(varchar(10),addtime,120)
select
convert(varchar(10),addtime,120),count(1)
from
tb
where
datediff(dd,addtime,getdate())>=0
group by
convert(varchar(10),addtime,120)
convert(varchar(10),addtime,120),count(1)
from
tb
where
datediff(dd,addtime,getdate())>=0
group by
convert(varchar(10),addtime,120)
区别是??