sql获取group后的总行数


--1、获取数据后使用该函数
select @@ROWCOUNT
 
--2、获取任意查询总行数          
SELECT COUNT(*)
FROM (SELECT 1 AS "Col"
FROM [LTDepotLog]
GROUP BY convert(varchar(10),
            operaTime,
            120),
            operator) AS A


你可能感兴趣的:(sql)