首页 > 数据库 > Oracle > OCP 1Z0-051-69
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; |
解析:
升序时NULL值显示在最后,DESC时NULL显示在最前面
可以指定NULLS FIRST或NULLS LAST来决定NULL值放在最前面还是最后面
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1161527/ ,如需转载,请注明出处,否则将追究法律责任。