zoukankan      html  css  js  c++  java
  • OCP-1Z0-新051-61题版本-7

    QUESTION NO: 7

    Evaluate these two SQL statements:

    SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY salary DESC;

    SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC;

    What is true about them?

    A. The two statements produce identical results.

    B. The second statement returns a syntax error.

    C. There is no need to specify DESC because the results are sorted in descending order by default.

    D. The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.

    Answer: A

    答案解析:

    order by 2意思是select语句中第二个排序,即为salary,即排序是一样的。

    Explanation: Explanation: the two statement produce identical results as ORDER BY 2 will take the second column as sorting column.

    Incorrect answer:

    B there is no syntax error

    Cresult are sorted in ascending order by default

    DORDER BY 2 will take the second column as sorting column.


  • 相关阅读:
    软件测试常见概念
    Apollo简介及工作原理
    bug的编写技巧与级别划分
    native与H5优缺点及H5测试
    优惠券测试
    go语言-for循环
    go语言-流程控制--if
    go语言-二进制与位运算
    cookie和session
    AJAX
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13316241.html
Copyright © 2011-2022 走看看