SQL統計部門人數,人數爲0的部門也要顯示出來

  相同點:它們都以一張部門表(或類別表),其它表都有部門編號DepartmentID(類別編號)html 案例一:一張表post  select c.DepartmentID,c.DepartmentName, t.Num AS '人員數量' from T_Department as c  left join (select DepartmentID,COUNT(*) AS Num from T
相關文章
相關標籤/搜索