【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 ...
随机推荐
- DBNavigator中把insert变为append
procedure TForm1.DBNavigator1Click(Sender: TObject; Button: TNavigateBtn);begin if Button = nbIns ...
- 带参数setTimeout
/* 功能:修改 window.setTimeout,使之可以传递参数和对象参数 使用方法: window.setTimeout(回调函数,时间,参数1,,参数n) ...
- MS SQL 2000 分配权限
/** 分配权限 **/ use [master]create login [ln-tf\liaobin] from windows;gogrant control server to [ln-tf\ ...
- CentOS装机必备-基本设置以及缺失文件
主要是虚拟机中安装CentOS每次总会做一些设置,记录下来方便以后. 纯粹基本设置,比如本地SecureCRT可以连接虚拟机中的CentOS. 复杂的非基本设置见:Linux 命令集锦 设置网络 自 ...
- google-gson库下的gson的基本使用
public class Users { private String username; private String password; private Integer age; public S ...
- XMLHttpRequest对象的常用方法和属性(相当重要!!!)
方法:写在这里的为必选参数或者经常用到的可选参数 一, open(); 书上解释: 用于设置请求的目标url请求方法, 以及其他参数信息 个人理解: 发送请求的页面在不刷新的情况能将参数传给一个服务器 ...
- 46. Permutations (Back-Track,Sort)
Given a collection of numbers, return all possible permutations. For example,[1,2,3] have the follow ...
- c语言静态断言-定义自己的静态断言
c语言里面可以自己定义静态断言,更加方便的调试代码. 使用静态断言 #include<stdio.h> #include<stdlib.h> #include<asser ...
- Oracle ADF 创建序列
双击VO,打开Attribute 标签页在弹出的窗口中选择Default Value Type 为“Expression”, value 的值为:(new oracle.jbo.server.Sequ ...
- Mybatis框架的输出映射类型
Mapper.xml映射文件中定义了操作数据库的sql,每个sql是一个statement,映射文件是mybatis的核心. resultType(输出类型) 1.输出简单类型 (1)我们在UserM ...