频道栏目
首页 > 资讯 > Oracle > 正文

Oracle Database 12c SQL面试题:WHERE和HAVING条件的题解

18-06-15        来源:[db:作者]  
收藏   我要投稿

Q2. Which statements are true regarding the WHERE and HAVING clauses in a SELECT statement? (Choose all that apply.)

A. The HAVING clause can be used with aggregate functions in subqueries.B. The WHERE clause can be used to exclude rows after dividing them into groups.C. The WHERE clause can be used to exclude rows before dividing them into groups.D. The aggregate functons and columns used in the HAVING clause must be specifed in the SELECT list of the query.E. The WHERE and HAVING clauses can be used in the same statement only if they are applied to difierent columns in the table.

Answer: A, C

对于 B 选项,子句要在 group 语句之前,不能之后排除。对于 D 选项,聚合函数和 having 子句指定的列不一定要在 select 列中出现。

对于 E 选项,where 和 having 可以是同一列。

相关TAG标签
上一篇:Sqoop拷贝MySQL数据表到HDFS存储的一系列步骤教程
下一篇:oracle和mysql的数据量在什么情况下需要分表?
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站