大數(shù)據(jù)就業(yè)實(shí)戰(zhàn)培訓(xùn) Oracle就業(yè)實(shí)戰(zhàn)培訓(xùn)
071考試題庫(kù)之前是比較穩(wěn)定的,但隨著Oracle的調(diào)整,071考試不斷的增加新的考題,增加了考試的難度,所以我們專(zhuān)門(mén)收集整理了這些考試,并對(duì)這些考題進(jìn)行解析,希望可以對(duì)考生有幫助。
每周五晚8點(diǎn),我們有免費(fèi)的OCP解析公開(kāi)課,地址:https://ke.qq.com/course/326223 OCP題庫(kù)交流群:1015267481,驗(yàn)證ocp
-------------------------------------------------------
071考試-第10題、choose the best answer
Evaluate the following SQL statement:
SQL> SELECT promo_id, promo_category
FROM promotions
WHERE promo_category = 'Internet' ORDER BY 2 DESC
UNION
SELECT promo_id, promo_category
FROM promotions
WHERE promo_category = 'TV'
UNION
SELECT promo_id, promo_category
FROM promotions
WHERE promo_category ='Radio';
Which statement is true regarding the outcome of the above query?
A) It produces an error because the ORDER BY clause should appear only at the end of a compound query-that is, with the last SELECT statement.
B) It executes successfully and displays rows in the descending order of PROMO_CATEGORY.
C) It produces an error because positional notation cannot be used in the ORDER BY clause with SET operators.
D) It executes successfully but ignores the ORDER BY clause because it is not located at the end of the compound statement.
Answer:A
(執(zhí)行時(shí) order by 子句只能出現(xiàn)最后的 select 語(yǔ)句,否則出現(xiàn)“ORA-00933: SQL 命令未正確結(jié)束”錯(cuò)誤)