67.Which two statements are true regarding the ORDER BY clause? (Choose two.)
2016-03-02 10:50
465 查看
67.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 containin g 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 最后执行,第一个执行的应该是from,A错误,
SQL> select 1 from dual group by 1 having count(1)>0 order by 1;
1
----------
1
所以C错误,
D选项不知道他说啥,好像是说order 中不能是表达式
SQL> select * from dept order by 2*deptno;
DEPTNO DNAME LOC
---------- ---------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
70 D70 L70
所以D错误
B说的是order by在sql的最后
E说的是可以指定位置排序
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 containin g 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 最后执行,第一个执行的应该是from,A错误,
SQL> select 1 from dual group by 1 having count(1)>0 order by 1;
1
----------
1
所以C错误,
D选项不知道他说啥,好像是说order 中不能是表达式
SQL> select * from dept order by 2*deptno;
DEPTNO DNAME LOC
---------- ---------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
70 D70 L70
所以D错误
B说的是order by在sql的最后
E说的是可以指定位置排序
相关文章推荐
- iOS开发UItextfile弹出日期选择控制器输入日期
- Phoenix中Sequence的用法
- 【转载】C# Winform 跨线程更新UI控件常用方法总结
- UITableView学习笔记
- 【leetcode】【63】Unique Paths II
- UIKit性能调优实战讲解
- 《iOS Human Interface Guidelines》——Navigation Bar
- question_007-JAVA之对List的排序???
- FineUI秘密花园(六) — 表单控件
- UIAlertController点击背景回收弹窗的问题
- 插入数据库 出现 Data truncation: Out of range value adjusted for column 'id'....的问题
- Gradle version 1.10 is required. Current version is 2.X的解决办法
- RatingBar android:isIndicator="true"
- 【leetcode】【60】Permutation Sequence
- UIAlertController的使用+唤醒相机|相册的使用
- HDU 5412 CRB and Queries(整体二分)
- CSU 1515 Sequence(莫队算法)
- FluentNHibernate 复合主键报错
- java swing setUndecorated(true) 无效
- 用UIActivityViewController做共享