ITPub博客

首页 > 数据库 > Oracle > OCP 1Z0 051 156

OCP 1Z0 051 156

原创 Oracle 作者:LuiseDalian 时间:2014-05-28 08:57:21 0 删除 编辑
(156)Evaluate the following SQL statement:

SELECT cust_id, cust_last_name "Last Name" FROM customers WHERE country_id = 10

UNION

SELECT cust_id CUST_NO, cust_last_name FROM customers WHERE country_id = 30;

Which ORDER BY clauses are valid for the above query? (Choose all that apply.)

A. ORDER BY 2,1

B. ORDER BY CUST_NO

C. ORDER BY 2,cust_id

D. ORDER BY "CUST_NO"

E. ORDER BY "Last Name"

答案:(A、C、E)

解析:

ORDER BY子句中列的序号和列名可以混合使用

B(X),最后的结果集中不会有CUST_NO列,因为它与第一个查询的对应的列名不同,会使用第一个查询中的列名

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1171407/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: OCP 1Z0 051 159
下一篇: OCP 1Z0 051 158
请登录后发表评论 登录
全部评论

注册时间:2012-02-06

  • 博文量
    1986
  • 访问量
    6040880