【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 ...
随机推荐
- Air File.load加载问题
不要用File.load同时加载多个文件,有时会引起程序崩溃. 在需要同时加载多个文件时,要一个一个排队加载,等到上一个加载完成再加载下一个. 也可以设定一个static的File,加载前先File. ...
- 第6章 数组、指针与字符串(一)基于范围的for循环
- 【poj2411】Mondriaan's Dream 状态压缩dp
AC传送门:http://vjudge.net/problem/POJ-2411 [题目大意] 有一个W行H列的广场,需要用1*2小砖铺盖,小砖之间互相不能重叠,问有多少种不同的铺法? [题解] 对于 ...
- react-native 打包 出apk
先上步骤: 一. 生成签名文件(my-release-key.keystore文件) Android要求所有应用都有一个数字签名才会被允许安装在用户手机上 1. 在项目目录下运行如下命令: keyt ...
- JDeveloper 开发环境配置
JDeveloper 开发环境配置 程序员的基础教程:菜鸟程序员
- mysql索引原理及用法
MySQL索引原理及慢查询优化 Mysql explain用法和性能分析 MySQL 索引优化全攻略 1.索引作用 在索引列上,除了上面提到的有序查找之外,数据库利用各种各样的快速定位技术,能够大大提 ...
- Undo Architecture
[Undo Architecture] NSUndoManager is a general-purpose recorder of operations for undo and redo. NSU ...
- Converting HTML to PDF with pdfHTML
https://itextpdf.com/itext7/pdfHTML pdfHTML 的一个例子 一个基本的例子将显示使用 pdfHTML.为此, 我们将使用下面的 HTML 和 CSS. < ...
- IntelliJ IDEA 2017版 SpringBoot的Json字符串返回
一.说明 SpringBoot框架已经自动封装好json字符串解析,所以我们只需要用它的注解来返回操作就可以了. 二.实战 1.书写一个实体类User,设置属性id和name package com. ...
- 递归,回溯和DFS的区别
递归是一种算法结构,回溯是一种算法思想一个递归就是在函数中调用函数本身来解决问题回溯就是通过不同的尝试来生成问题的解,有点类似于穷举,但是和穷举不同的是回溯会“剪枝”,意思就是对已经知道错误的结果没必 ...