OCP-1Z0-051-V9.02-9题

9. Which statement is true regarding the INTERSECT operator?

A. It ignores NULL values.

B. Reversing the order of the intersected tables alters the result.

C. The names of columns in all SELECT statements must be identical.

D. The number of columns and data   types must be identical for all SELECT statements in the query.

Answer: D

答案解析:

参考:http://blog.csdn.net/rlhua/article/details/12883007

A. 它忽略空值,错误,不会忽略空值
B. 交换交集表的前后顺序可以改变交集结果,错误,不会改变结果
C. 所有SELECT查询语句中的列的名字必须相同。错误,列名可以不必相同
D. 对于所有SELECT查询语句,列的数量和数据类型必须相同。

使用INTERSECT运算符可以返回多个查询的所有共同行。
准则
• 在查询中使用的所有SELECT语句中,由查询中的SELECT语句选定的列数和列的数据类型必须相同。不过,列名不必相同。
• 使相交的表按反方向排序不会更改结果。
• INTERSECT不会忽略NULL值。

原文地址:https://www.cnblogs.com/hzcya1995/p/13316810.html