【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 ...
随机推荐
- Spring Boot日志集成
Spring Boot日志框架 Spring Boot支持Java Util Logging,Log4j2,Lockback作为日志框架,如果你使用starters启动器,Spring Boot将使用 ...
- iframe 元素会创建包含另外一个文档的内联框架(即行内框架)
HTML 与 XHTML 之间的差异 在 HTML 4.1 Strict DTD 和 XHTML 1.0 Strict DTD 中,不支持 iframe 元素. 提示和注释: 提示:您可以把需要的文本 ...
- jboss & eclipse 集成
* 前提: * 安装了 eclipse-jee-3.5.1 * 解压了 jboss5.1 * * "jboss tools" - "J ...
- k8s实战
wget https://github.com/coreos/etcd/releases/download/v2.2.0/etcd-v2.2.0-linux-amd64.tar.gz etcd -na ...
- Cocoa Touch(三):图形界面UIKit、Core Animation、Core Graphics
UIKit 视图树模型 1.视图树模型 计算机图形实际上是一个视图树模型,每个视图都有一个本地坐标系.每个本地坐标系的组成部分是:原点在父坐标系中的位置,每个基在父坐标系中的位置,由此就可以根据向量的 ...
- (K)ubuntu上将分区格式化成NTFS格式
新买了硬盘,装系统时,为Windows预留了几个分区,由于没有其他选择,因此将分区格式化成了fat32格式.装完系统后,总是很纠结,想把这些分区格式化成NTFS格式. google了一下,从这个网址( ...
- 子串字谜substring anagrams
[抄题]: 给定一个字符串 s 和一个 非空字符串 p ,找到在 s 中所有关于 p 的字谜的起始索引.字符串仅由小写英文字母组成,字符串 s 和 p 的长度不得大于 40,000.输出顺序无关紧要. ...
- [leetcode]621. Task Scheduler任务调度
Given a char array representing tasks CPU need to do. It contains capital letters A to Z where diffe ...
- MySql 8小时解决方案:proxool连接池
最近做的项目用的mysql数据库,前天挂在服务器上,昨天早晨上班一来,同事就说API数据接口访问不了了,我马上mstsc登陆服务器看,报错了.马上重启tomcat,结果还能正常运行,当时没管,今天过来 ...
- spring property标签中的 ref属性和ref 标签有什么不同? 如下:<property name="a" ref="b" />
spring property标签中的 ref属性和ref 标签有什么不同? 如下:<property name="a" ref="b" /> sp ...