OCP-1Z0-051 第69题 ORDER BY 的null值排序
来源:互联网 发布:产品摄影 知乎 编辑:程序博客网 时间:2024/06/07 12:39
一、原题
You need to generate a list of all customer last names with their credit limits from the CUSTOMERS table. Those customers who do not have a credit limit should appear last in the list.
Which two queries would achieve the required result? (Choose two.)
A. SELECT cust_last_name, cust_credit_limit
FROM customers
ORDER BY cust_credit_limit DESC ;
B. SELECT cust_last_name, cust_credit_limit
FROM customers
ORDER BY cust_credit_limit;
C. SELECT cust_last_name, cust_credit_limit
FROM customers
ORDER BY cust_credit_limit NULLS LAST;
D. SELECT cust_last_name, cust_credit_limit
FROM customers
ORDER BY cust_last_name, cust_credit_limit NULLS LAST;
答案:BC
二、题目翻译Which two queries would achieve the required result? (Choose two.)
A. SELECT cust_last_name, cust_credit_limit
FROM customers
ORDER BY cust_credit_limit DESC ;
B. SELECT cust_last_name, cust_credit_limit
FROM customers
ORDER BY cust_credit_limit;
C. SELECT cust_last_name, cust_credit_limit
FROM customers
ORDER BY cust_credit_limit NULLS LAST;
D. SELECT cust_last_name, cust_credit_limit
FROM customers
ORDER BY cust_last_name, cust_credit_limit NULLS LAST;
答案:BC
要根据CUSTOMERS表生成一个列表,显示客户的last name和他们的credit limits,那些没有credit limit的客户显示到列表的后面。(即null值放在最后)
哪两个查询能获取所需结果(选择两个正确的选项)
三、题目解析哪两个查询能获取所需结果(选择两个正确的选项)
A选项不正确,因为默认情况下,cust_credit_limit DESC降序排列后,空值会排列到前面。
B选项正确,默认升续排列,空值会排列到后面。
C选项正确,NULLS LAST关键字可以把空值排列到后面。
D选项不正确,因为排序条件不正确,先按名字排序了。
B选项正确,默认升续排列,空值会排列到后面。
C选项正确,NULLS LAST关键字可以把空值排列到后面。
D选项不正确,因为排序条件不正确,先按名字排序了。
0 0
- OCP-1Z0-051 第69题 ORDER BY 的null值排序
- OCP-1Z0-051 第63题 order by 应用
- OCP-1Z0-051 第65题 order by降序排序
- OCP-1Z0-051 第68题 ORDER BY的默认值
- OCP-1Z0-051 第112题 GROUP BY,ORDER BY子句
- OCP-1Z0-051 第59题 null值判断
- OCP-1Z0-051 第163题 判断null值
- OCP-1Z0-051 第64题 order by使用别名注意事项
- OCP-1Z0-051 第66题 ORDER BY子句应用
- OCP-1Z0-051 第67题 ORDER BY子句应用
- OCP-1Z0-051 第70题 order by排升序,降序
- OCP-1Z0-051 第156题 集合操作中的ORDER BY 子句
- OCP-1Z0-051 补充题库 第7题 ORDER BY 子句
- OCP-1Z0-051 补充题库 第10题 集合操作中的ORDER BY子句
- OCP-1Z0-051 第111题 GROUP BY子句
- ocp 051 第64题,有关order by 的试验
- OCP-1Z0-051 第57题 别名和null值判断
- OCP-1Z0-051 第146题 子查询中的null值
- vs2010中删除sdf文件和ipch文件夹
- oracle中OLTP和OLAP
- vs2008 调用matlab 2013a引擎
- [置顶] XMPPFrameWork IOS 开发(二)- xcode配置
- JavaSE(1):java基础知识及基础语法
- OCP-1Z0-051 第69题 ORDER BY 的null值排序
- linux文件属性和权限
- 六、PYTHON 学习之装饰器使用
- 数据库主从表和主细表简介
- 带时间戳算法-----类似authcode开源算法
- Dynamics CRM 2011/2013 通过Javascript给lookup字段赋值
- Java版的CKEditor + CKFinder图片上传
- [置顶] XMPPFrameWork IOS 开发(三)登录
- GitHub上的SliddingMenu滑动过程中卡顿问题的解决办法