【OCP认证12c题库】CUUG 071题库考试原题及答案(28)
28.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
(执行时 order by 子句只能出现最后的 select 语句,否则出现“ORA-00933: SQL 命令未正确结束”错误)
【OCP认证12c题库】CUUG 071题库考试原题及答案(28)的更多相关文章
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(27)
27.choose two The SQL statements executed in a user session are as follows: SQL> CREATE TABLE pro ...
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(26)
26.choose two Examine the structure of the PRODUCTS table. Which two statements are true? A) EXPIRY_ ...
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(25)
25. choose the best answer Evaluate the following SQL statement: ALTER TABLE hr.emp SET UNUSED (mgr_ ...
- 【12c OCP】CUUG OCP认证071考试原题解析(36)
36.choose the best answer View the Exhibits and examine the structures of the PRODUCTS, SALES, and C ...
- 【Oracle 12c】CUUG OCP认证071考试原题解析(35)
35.choose the best answer View the Exhibit and examine the description of the EMPLOYEES table. Evalu ...
- 【12c OCP】CUUG OCP认证071考试原题解析(34)
34.choose two View the Exhibit and examine the structure of the PRODUCT_INFORMATION and INVENTORIES ...
- 【12c OCP】CUUG OCP认证071考试原题解析(33)
33.choose the best answer View the Exhibit and examine the structure of the ORDER_ITEMS table. Exami ...
- 【Oracle 12c】CUUG OCP认证071考试原题解析(32)
32.choose the best answer View the Exhibit and examine the data in EMP and DEPT tables. In the DEPT ...
- 【Oracle 12c】CUUG OCP认证071考试原题解析(31)
31.choose the best answer Which statement is true regarding the USING clause in table joins? A) It c ...
随机推荐
- 人脸识别-<转>
人脸检测库libfacedetection介绍 libfacedetection是于仕琪老师放到GitHub上的二进制库,没有源码,它的License是MIT,可以商用.目前只提供了windows 3 ...
- js中获取父节点,兄弟节点及处理属性节点
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- how to deal with EINTR fault
[how to deal with EINTR fault] EINTR:interupted error.是指一个调用被信号给中断,对于同步的耗时调用来说,这个操作常见,譬如select.read. ...
- Unix高级编程Note1
[Unix Notes] 1./etc/passwd 2.extern int errno; 3.限制, limit.h 4.文件原子操作:O_EXCL & O_CREAT 5.stat操作 ...
- js获得URL中的参数
js获得URL中的参数 function GetQueryString(name) { var reg = new RegExp("(^|&)" + name + &quo ...
- 第六章 Windows应用程序对键盘与鼠标的响应
- socket收发消息
.socket通讯类 using System; using System.Collections.Generic; using System.Net; using System.Net.Socket ...
- DataStage 一、安装
安装的详细信息记录于文档中,文档下载地址:http://pan.baidu.com/s/1pJCF9uN 密码: y2ry ;文档内容目录如下: DataStage 一.介绍和安装.......... ...
- iOS 越狱Keynote
[iOS Keynote] 1.2009年暴露的IKee病毒是iOS上公开的第一款蠕虫病毒,它会感染那些已经越狱并且安装了SSH,但是又没有更改其默认root密码"alpine"的 ...
- iOS6后的内存警告处理
[iOS6后的内存警告处理] The memory used by a view to draw itself onscreen is potentially quite large. However ...