【OCP 12c】最新CUUG OCP-071考试题库(61题)
61、(18-6) choose the best answer:
View the Exhibit and examine the structure of the CUSTOMERS table.
You want to generate a report showing the last names and credit limits of all customers whose last names start with A, B, or C, and credit limit is below 10,000.
Evaluate the following two queries:
SQL> SELECT cust_last_name, cust_credit_limit FROM customers
WHERE (UPPER(cust_last_name) LIKE 'A%' OR
UPPER(cust_last_name) LIKE 'B%' OR
UPPER(cust_last_name) LIKE 'C%')
AND cust_credit_limit < 10000;
SQL> SELECT cust_last_name, cust_credit_limit FROM customers
WHERE UPPER(cust_last_name) BETWEEN 'A' AND 'C'
AND cust_credit_limit < 10000;
Which statement is true regarding the execution of the above queries?
A) Only the second query gives the correct result.
B) Only the first query gives the correct result.
C) Both execute successfully but do not give the required result.
D) Both execute successfully and give the same result.
Answer:B
(解析:验证结果发现第二 sql 语句不能返回 C 开头的名字,如果改为 BETWEEN 'A' AND 'D',则查出来的结果与第一个语句一样,而且语句简洁,答案更好。
经过测试发现,如果数据类型是 number 的,则 between 800 and 3000 的结果包含 3000 的值:
SQL> select sal from emp where sal between 800 and 3000;
SAL
---------
800
1600)
1500
950
3000
但是如果是字符型的,则不包含between 'A' AND 'C'后面的 C :
SQL> select ename from emp where ename between 'A' AND 'C';
ENAME
----------
ALLEN
BLAKE
)
【OCP 12c】最新CUUG OCP-071考试题库(61题)的更多相关文章
- 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)
72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)
71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(70题)
70.(31-2)choose the best answer: View the Exhibit and examine the structure of the Book table. The B ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)
69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(68题)
68.(29-13)choose two: Which two statements are true? (Choose two.) A) DICTIONARY is a view that cont ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)
67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)
66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(65题)
65.(22-16) choose the best answer: The CUSTOMERS table has the following structure: You need to writ ...
- 【12c OCP】最新CUUG OCP-071考试题库(52题)
52.(12-11) choose the best answer: Examine the structure and data in the PRICE_LIST table: You plan ...
- 【12c OCP】最新CUUG OCP-071考试题库(51题)
------------------------------------------------------- 51.(12-10)choose the best answer: Evaluate t ...
随机推荐
- Visio2013 64位下载安装以及破解激活教程
特别说明:以下教程如果未能破解激活,请在断网条件下安装破解!!!! 安装: Visio2013 professional版下载地址:https://pan.baidu.com/s/1gzwcGTevV ...
- 可视化库-Matplotlib基础设置(第三天)
1.画一个基本的图 import numpy as np import matplotlib.pyplot as plt # 最基本的一个图,"r--" 线条加颜色, 也可以使用l ...
- Oracle数据库备份与恢复命令
备份:exp 用户名/密码@实例 file="e:\databack\XX_%date%.dmp" log = "e:\databack\XX8_%date%log.t ...
- Angular: Can't bind to 'ngModel' since it isn't a known property of 'input'问题解决
https://blog.csdn.net/h363659487/article/details/78619225 最初使用 [(ngModel)] 做双向绑定时,如果遇见Angular: Can't ...
- iOS 通过URL网络获取XML数据的两种方式
转载于:http://blog.csdn.net/crayondeng/article/details/8738768 下面简单介绍如何通过url获取xml的两种方式. 第一种方式相对简单,使用NSD ...
- maven核心概念及约定的目录结构
- Kubernetes集群向指定节点上创建容器
如果需要限制Pod到指定的Node上运行,则可以给Node打标签并给Pod配置NodeSelector. 给节点添加标签 首先查看节点信息 [root@k8s-master ~]# kubectl g ...
- 28-python 中格式对齐之中文格式对齐问题
一般的可以按这个搞,但是中文就会有问题: python基础_格式化输出(%用法和format用法) 对于 print('1234567890' * 10)print('%10s' % '今天好')pr ...
- 映射文件中增删改查标签中的parameterType和resultType
parameterType:指定输入参数类型,mybatis通过ognl从输入对象中获取参数值拼接在sql中. resultType:指定输出结果类型,mybatis将sql查询结果的一行记录数据映射 ...
- Cook-Torrence Illumination Model 的一些数学说明
Cook-Torrence 光照模型如下: 这个Io就是计算后最终的光强,主要是用来计算镜面反射光,漫反射和环境光的计算和Phong模型一致. F:Fresnel反射系数.主要用来说明反射光强度占入射 ...