您的位置:首页 > 编程语言 > Lua

156.Evaluate the following SQL statement:

2016-03-15 14:40 465 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: