語(yǔ)法:having [search-condition]
search-condition 指定組或聚合滿足的搜索提哦案件。當(dāng)having 與group by all 一起用時(shí)having語(yǔ)句代替all
例如:select distinct demp ,count(*) as counts,max(jbgz) as maxgx,avg(jbgz) as avggz from tab_laborage group by demp having avg(jbgz)>1500
將部門(mén)工資大于1500 的部門(mén)信息檢索出來(lái)