67.Which two statements are true regarding the ORDER BY clause? (Choose two.)

来源:互联网 发布:知乎 win10 杀毒软件 编辑:程序博客网 时间:2024/05/18 02:19
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说的是可以指定位置排序                 
0 0