一句sql:
SELECT t.SystemCode,COUNT(*) from t_system_test t GROUP BY t.SystemCode HAVING COUNT(*) >1 ORDER BY t.SystemCode
前后顺序
1.where
2.griup by
3.having
4.order by
having主要是用于函数筛选的时候使用。
一句sql:
SELECT t.SystemCode,COUNT(*) from t_system_test t GROUP BY t.SystemCode HAVING COUNT(*) >1 ORDER BY t.SystemCode
前后顺序
1.where
2.griup by
3.having
4.order by
having主要是用于函数筛选的时候使用。