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题)的更多相关文章

  1. 【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 ...

  2. 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)

    67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...

  3. 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)

    66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...

  4. 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)

    72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...

  5. 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)

    71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...

  6. 【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 ...

  7. 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)

    69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...

  8. 【OCP-12c】2019年CUUG OCP 071考试题库(74题)

    74.View the exhibit and examine the structure of ORDERS and CUSTOMERS tables. ORDERS Name     Null?  ...

  9. 【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 ...

随机推荐

  1. Variation Model的应用

    Variation Model的主要原理是将待检测的图像与一张标准图像作比较,找出待检测图像与标准图像(ideal image)的明显差异(也就是不良). 标准图像可以采用几张OK品的图像训练(tra ...

  2. 迷你MVVM框架 avalonjs 沉思录 第2节 DOM操作的三大问题

    jQuery之所以击败Prototype.js,是因为它自一开始就了解这三大问题,并提出完善的解决方案. 第一个问题,DOM什么时候可用.JS不像C那样有一个main函数,里面的逻辑不分主次.但JS是 ...

  3. go 算法 查询字符在字符串中的位置

    在utf8字符串判断是否包含指定字符串,并返回下标."北京天安门最美丽" , "天安门"结果:2 解答: import ( "fmt" &q ...

  4. for 续7

    ----------siwuxie095                 for 中的变量:     FOR 变量参照的替换已被增强.您现在可以使用下列选项语法: ~I - 删除任何引号(" ...

  5. cocos2dx中使用tolua++使lua调用c++函数

    一直想学学cocos2dx中如何使用tolua++工具使得lua脚本调用C++函数,今天就来搞一下,顺便记录下来: 首先,我们打开cocos2dx-2.2.4中projects下的test的VS工程, ...

  6. [Selenium]怎样等待元素出现之后再消失,譬如Loading icon

    界面上有些元素是要先等它出现,再等它消失,譬如loading icon 这个是等多个loading icon出现后消失 /** * Wait for loading icon disappear in ...

  7. 没有Home键之后的iPhone会是什么样子?

    以下内容由Mockplus团队翻译整理,仅供学习交流,Mockplus是更快更简单的原型设计工具. 之前笔者推测新一代的iPhone不会再有“Home”键.果不其然,9月13日苹果发布会证实了笔者的观 ...

  8. 关于Safari浏览器使用的几点总结

    声明:下载的是Safari英文版本,在Windows操作系统下使用. 一.Safari浏览器中的开发者调试工具隐藏得比较深,找了好久才找到的,方法:按一下键盘上的alt键,浏览器上方就会弹出一个开发者 ...

  9. HDU 1060 Leftmost Digit (数学log)

    题意:给定一个数n,让你求出n的n次方的第一位数. 析:一看这个n快到int极限了,很明显不能直接做,要转化一下.由于这是指数,我们可以把指数拿下来. 也就是取对数,设ans = n ^ n,两边取以 ...

  10. Spring全局异常处理

    最近学习Spring时,认识到Spring异常处理的强大.之前处理工程异常,代码中最常见的就是try-catch-finally,有时一个try,多个catch,覆盖了核心业务逻辑: 1 try{ 2 ...