【OCP题库】最新CUUG OCP 12c 071考试题库(65题)
65、(22-16) choose the best answer:
The CUSTOMERS table has the following structure:

You need to write a query that does the following tasks:
1. Display the first name and tax amount of the customers. Tax is 5% of their credit limit.
2. Only those customers whose income level has a value should be considered.
3. Customers whose tax amount is null should not be considered.
Which statement accomplishes all the required tasks?
A) SELECT cust_first_name, cust_credit_limit * .05 AS TAX_AMOUNT
FROM customers
WHERE (cust_income_level,tax_amount) IS NOT NULL;
B) SELECT cust_first_name, cust_credit_limit * .05 AS TAX_AMOUNT
FROM customers
WHERE cust_income_level IS NOT NULL AND
cust_credit_limit IS NOT NULL;
C) SELECT cust_first_name, cust_credit_limit * .05 AS TAX_AMOUNT
FROM customers
WHERE cust_income_level <> NULL AND
tax_amount <> NULL;
D) SELECT cust_first_name, cust_credit_limit * .05 AS TAX_AMOUNT
FROM customers
WHERE cust_income_level IS NOT NULL AND
tax_amount IS NOT NULL;
Answer:B
(解析:条件语句中不能用别名当做条件,该题的题意是税额不能为 0,所以只要 cust_credit_limit 不为 0,则保证税额不会为 0
【OCP题库】最新CUUG OCP 12c 071考试题库(65题)的更多相关文章
- 【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题库-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-12c】2019年CUUG OCP 071考试题库(74题)
74.View the exhibit and examine the structure of ORDERS and CUSTOMERS tables. ORDERS Name Null? ...
- 【OCP-12c】2019年CUUG OCP 071考试题库(80题)
80.View the exhibit and examine the structure in ORDERS and ORDER_ITEMS tables. You need to create a ...
随机推荐
- javascript 特定字符分隔字符串函数
function fn(num,div,token){//num需要分割的数字,div多少位分割 token分割字符 num=num+'',div=div||3,token=token||',' re ...
- VUE项目 - IE报vuex requires a Promise polyfill in this browser问题解决
第一步: 安装 babel-polyfill . babel-polyfill可以模拟ES6使用的环境,可以使用ES6的所有新方法 npm install --save babel-polyfill ...
- eclipse cut copy paste plugin
The Cut Copy Paste Plus plug-in enhances the standard Cut, Copy and Paste commands in Eclipse IDE. W ...
- 读取指定路径的Properties文件
1.读取项目内的properties文件,项目内的properties文件一般都放在resource文件夹下面, 通过getClassLoader().getResourceAsStream()来获取 ...
- 08-SSH综合案例:前台用户模块:注册页面的前台JS校验
这个是MyEclipse设置的问题 把设置去掉就没问题了. 你也可以在每一个input后面加个span来显示提示的信息.这些东西也要提交到后台,后台也是要对这些东西进行校验的.
- Python3 hex() 函数
Python3 hex() 函数 Python3 内置函数 描述 hex() 函数用于将一个指定数字转换为 16 进制数. 语法 hex 语法: hex(x) 参数说明: x -- 一个整数 返回值 ...
- Oracle 注意点大全
1.索引 经常查询的字段.主表与从表关联主键id必须建立索引.
- (基于Java)算法之动态规划——矩阵连乘问题
动态规划(Dynamic Programming):与分治法类似,其基本思想也是将待求解问题分解成若干个子问题,先求解子问题,然后从这些子问题的解得到原问题的解.与分治法不同的是,适用于动态规划法求解 ...
- sqlserver流程控制(待续)
if else: if(1=1) begin--必须1个=号print '111'--begin end 之间必须要有内容end else beginprint '222'end while: DEC ...
- MySQL 根据年、季度、月、周、日统计数据
-- 计算每年订单的总价格 select date_format(t.order_time,'%Y') years,sum(t.order_amount) '总价格' from lf_order t ...