141. View the Exhibit and examine the structure of CUSTOMERS and GRADES tables.

You need to display names and grades of customers who have the highest credit limit.

Which two SQL statements would accomplish the task? (Choose two.)

A. SELECT custname,grade

FROM customers, grades

WHERE (SELECT MAX(cust_credit_limit)

FROM customers) BETWEEN startval and endval;

B. SELECT custname,grade

FROM customers, grades

WHERE (SELECT MAX(cust_credit_limit)

FROM customers) BETWEEN startval and endval

AND cust_credit_limit BETWEEN startval AND endval;

C. SELECT custname,grade

FROM customers, grades

WHERE cust_credit_limit= (SELECT MAX(cust_credit_limit)

FROM customers)

AND cust_credit_limit BETWEEN startval AND endval;

D. SELECT custname,grade

FROM customers , grades

WHERE cust_credit_limitIN (SELECT MAX(cust_credit_limit)

FROM customers)

AND MAX(cust_credit_limit) BETWEEN startval AND endval;

答案:BC

C是正确的,B只要max(cust_credit_limit)在startval 和 endval里,所有cust_credit_limit在startval和endcal 里的都会查出来,

明显不能查到the highest credit limit。

最新文章

  1. MVC 定时执行任务
  2. 读书笔记---PMBOK第五版官方中文版
  3. iOS开发系列--Objective-C 之 KVC、KVO
  4. Excel jxl导入导出
  5. iOS开发----调用地图导航
  6. flex布局中flex-basis|flex-grow|flex-shrink
  7. SAP接口编程 之 JCo3.0系列(02) : JCo Client Programming
  8. easyui中的combobox小知识点~~
  9. JS(七)
  10. BZOJ 2007 NOI2010 海拔高度 最小减产计划
  11. ARM架构解析
  12. Python之scrapy安装
  13. angular4.0使用sass
  14. mycql 多表联合查询
  15. [Project] MiniSearch文本检索简介
  16. [UIView setShowsFPS:]: unrecognized selector sent to instance XXX
  17. Android中使用IntentService运行后台任务
  18. 每日英语:Surviving a Conference Call
  19. 张高兴的 Windows 10 IoT 开发笔记:无线收发芯片 nRF24L01
  20. [JSOI2008]Blue Mary的战役地图——全网唯一一篇dp题解

热门文章

  1. Could not load file or assembly'System.Data.SQLite.dll' or one of its depedencies
  2. Spring框架简介 Spring Framework Introduction
  3. [转]JAVA程序执行顺序,你了解了吗:JAVA中执行顺序,JAVA中赋值顺序
  4. mfc ui库
  5. socket.io稳定性及事件测试
  6. 你不要用战术上的勤奋掩盖战略上的懒惰by雷军
  7. css3属性之 box-sizing
  8. Linux 多线程编程 实例 2
  9. 滑动的Button
  10. 精通AngularJS 读书笔记(1)