博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【OCP认证12c题库】CUUG 071题库考试原题及答案(28)
阅读量:6516 次
发布时间:2019-06-24

本文共 996 字,大约阅读时间需要 3 分钟。

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 命令未正确结束”错误)

转载于:https://www.cnblogs.com/cnblogs5359/p/10411458.html

你可能感兴趣的文章
CentOS7纯净版安装
查看>>
nginx动静分离后个别静态文件代理至后端
查看>>
搭建Ruby on rails开发环境
查看>>
Mac OS X系统生成ssh公私钥
查看>>
实验案例一:迁移/home分区
查看>>
centos/ubuntu挂载vmdk、 vdi为块设备的方法(非vdfuse)
查看>>
win7每天第一次开机特别慢
查看>>
Java 信任所有SSL证书(解决PKIX path building failed问题)
查看>>
10.安装zabbix agent
查看>>
fingerprint sensor module
查看>>
“一个网络”,两种口味:响应性对适应性
查看>>
【C语言】迷宫游戏设计思路与功能体会及简单的改进报告
查看>>
docker运行consul cluster
查看>>
聊聊storm TridentTopology的构建
查看>>
免费的管理软件
查看>>
实验二 跨交换机实现VLAN
查看>>
foreach把二维数组和二维数组和并
查看>>
Linux中变量$#,$@,$0,$1,$2,$*,$$,$?的含义
查看>>
推荐一款免费的VMware审计工具
查看>>
一套完整自定义工作流的实现
查看>>