oracle having
时间: 2023-10-21 20:54:31 浏览: 96
在Oracle中,HAVING是用来对分组后的结果进行筛选的关键字。它必须结合GROUP BY一起使用,用于对分组后的数据进行过滤。具体而言,HAVING可以用来过滤掉不满足给定条件的分组结果。例如,我们可以使用HAVING语句找出重复出现的姓名:SELECT name FROM CSDN_HAVING GROUP BY name HAVING count(name) > 1。这个查询会返回在CSDN_HAVING表中重复出现的姓名。在MySQL中,HAVING也可以单独使用,不需要和GROUP BY一起。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* *2* [Oracle——group by分组和having的用法,以及与MySQL中用法的不同之处](https://blog.csdn.net/m0_65249647/article/details/130089753)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
- *3* [ORACLE数据库中HAVING用法笔记](https://blog.csdn.net/weixin_44999258/article/details/120783906)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文