QUESTION 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.
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.
答案:D
解析:
官方参考文档:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/queries004.htm#SQLRF52341
A选项,INTERSECT不会忽略NULL,因此错误。
B选项,交换行的顺序不会影响结果,因此错误。
C选项,SELECT语句不需要完全相同,因此错误。
D选项,只要行的数量和数据类型一致,就可以SELECT,因此正确。
本文探讨了SQL中INTERSECT操作符的使用细节,澄清了一些常见误区,并给出了正确的使用方式。文章指出,使用INTERSECT时,所有SELECT语句中的列数和数据类型必须一致。
911

被折叠的 条评论
为什么被折叠?



