2009年12月7日 星期一

SQL 語法如何做到小計與合計之範例

select (case when grouping(ename)=1 then '合計' when grouping(name)=1 then '' else ename end) as ename,(case when grouping(ename)=1 then '' when grouping(name)=1 then '小計' else name end) as name,count(*) as cnt from student group by ename,name with rollup

沒有留言:

自訂權限驗證機制

// 使用 filter [Route("api/[controller]")] [ApiController] [Authorize] [TypeFilter(typeof(CustomAsyncAuthorizationFilter))] public c...