34,576
社区成员
发帖
与我相关
我的任务
分享
select ISNULL(convert(nvarchar(20),datepart(year,tdate)),N'未设定') as 年度,
count(*)
from tb
group by datepart(year,tdate)
--或者这样,修改排序规则
select ISNULL(convert(nvarchar(20),datepart(year,tdate)),'未设定' collate Chinese_PRC_CI_AS) as 年度,
count(*)
from tb
group by datepart(year,tdate)