【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 ...
随机推荐
- 自己创建js文件
js文件的创建: /** * Created by Administrator on 2018/7/14. */ (function(arg){ var status = 1; $.extend({ ...
- Spring cloud 两种服务调用方式(Rest + Ribbon) 和 Fegin方式
1:Rest + Ribbon @Bean @LoadBalanced RestTemplate restTemplate() { return new RestTemplate(); } @Auto ...
- LUA ipairs遍历的问题
t = { 1, 2, 3, nil, 4,} for k, v in ipairs(t) doprint(k, v)end print("------------------------- ...
- Linux学习---linux系统下安装配置Jenkins
1.首先准备java环境,安装JDK 2.下载jenkins至Linux服务器 下载地址:https://wiki.jenkins-ci.org/display/JENKINS/Installing+ ...
- 0. ACM系列算法
0.1 数学 0.1.1 概率 http://www.cnblogs.com/jiu0821/tag/%E6%A6%82%E7%8E%87/ 0.1.2 代数 0.1.2.1 Polya 0.1.2. ...
- Python_07-常用函数
1 python常用常用函数 1.1 常用内置函数 1.2 类型转换函数 1.3 和操作系统相关的调用 1.3.1 操作举例 1.4 用os ...
- $_SERVER['PHP_AUTH_USER']
PHP 的 HTTP 认证机制仅在 PHP 以 Apache 模块方式运行时才有效,因此该功能不适用于 CGI 版本.在 Apache 模块的 PHP 脚本中,可以用 header() 函数来向客户端 ...
- abp CrudAppService 自定义分页、排序
public class GetAllTasksInput : PagedAndSortedResultRequestDto { public TaskState? State { get; set; ...
- c# 调用外包程序 等待处理完成结果
string root = @"J:\yaoqianshu"; string pythonPath = "解压缩拷贝启动动画测试(新).py"; string ...
- jquery的理解
1.jquery的好处 简化js的复杂操作 不再需要关心兼容性 提供大量使用方法 2.jquery的设计思想 选择网页元素 -模拟css选择元素 -独有的表达式选择 -多种筛选方法 写法 -方法函数化 ...