OCP-1Z0-051-2015-27题

来源:互联网 发布:万能尺子软件 编辑:程序博客网 时间:2024/06/05 23:42
QUESTION NO: 27
Which statement is true regarding the UNION operator?

A. The number of columns selected in all SELECT statements need to be the same

在所有SELECT语句中选择的列的数量必须相同。正确

B. Names of all columns must be identical across all SELECT statements

列名在所有SELECT语句中必须是相同的,错误,列名不必相同。

C. By default, the output is not sorted

默认情况下,结果不排序,错误,在默认的情况下,输出按SELECT子句中列的升序进行排序。

D. NULL values are not ignored during duplicate checking

在重复项检查过程中不会忽略NULL值,正确。

Answer: AD
Explanation:

The SQL UNION query allows you to combine the result sets of two or more SQL SELECT statements. It removes duplicate rows between the various SELECT statements.

Each SQL SELECT statement within the UNION query must have the same number of fields in the result sets with similar data types.


UNION运算符用于返回由任一查询选定的所有行。使用UNION运算符可以返回多个表中的所有行,但不包括重复行。
准则:
• 所选列的数量必须相同。
• 所选列的数据类型必须属于相同的数据类型组(如数字或字符)。
• 列名不必相同。
• UNION将对所有选定的列执行操作。
• 在重复项检查过程中不会忽略NULL值。
• 默认情况下,输出按SELECT子句中列的升序进行排序。


0 0
原创粉丝点击