156.Evaluate the following SQL statement:

来源:互联网 发布:菲尼克斯之光 知乎 编辑:程序博客网 时间:2024/05/29 06:59
156.Evaluate the following SQL statement:
SQL> 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"
答案:ACE
解析:union 合并的时候是按照第一条sql语句列走的
A:正确,通过占位符号走的,与列别名没有关系
B:错误,第一条sql没有cust_no
C:正确,2是占位符号,cust_id第一条也存在
D:错误,和B一样
E:正确:第一条sql存在Last Name
0 0
原创粉丝点击