您的位置:首页 > 数据库

sql where having order by的顺序

2016-02-20 11:04 337 查看
一句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主要是用于函数筛选的时候使用。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  select sql