SQL---having

select sex from users group by sex having age>=35 
说明:having <条件>中的字段必须是select 查询字段之一。

select sex from users group by sex having count(id)>=2;说明:如果 having后面有聚合函数,则无此限制。

posted @ 2015-07-24 09:35  框框A  阅读(151)  评论(0编辑  收藏  举报