OCP-1Z0-051 第67题 ORDER BY子句应用

来源:互联网 发布:漫画算法系列 编辑:程序博客网 时间:2024/05/22 11:58
一、原题
Which two statements are true regarding the ORDER BY clause? (Choose two.)
A. It is executed first in the query execution.
B. It must be the last clause in the SELECT statement.
C. It cannot be used in a SELECT statement containing a HAVING clause.
D. You cannot specify a column name followed by an expression in this clause.
E. You can specify a combination of numeric positions and column names in this clause.

答案:BE
二、题目翻译
关于ORDER BY子句的描述,哪两句话是正确的?(选择两个)
A. 查询语句首先执行ORDER BY子句。
B. 必须放在SELECT语句的最后。
C. 它不能用在包含HAVING子句的SELECT语句中。
D. 不能在该子句中指定一个带有表达式的列。
E. 可以在该子句中指定一个数字位置和列名的组合。
三、题目解析
A选项不正确,select语句中,ORDER BY是在select子句之后执行的,从ORDER BY子句中可以使用别名就可以看出。
B选项正确,ORDER BY子句是放在最后的。
C选项不正确,包含having子句的,是有group by分组语句,也可以在最后用order by 子句排序。
D选项不正确,ORDER BY子句中可以使用表达式,上一题中即可看出。
E选项正确,在ORDER BY 子句中,可以使用数字指定select后的第几列,也可以使用列名,也可以混合使用。
0 0
原创粉丝点击