我是靠谱客的博主 稳重皮带,最近开发中收集的这篇文章主要介绍1z0-071 Oracle Database 12c SQL 第9题 WITH TIES关键字,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

Q9. You want to display 5 percent of the rows from the SALES table for products with the lowest AMOUNT_SOLD and also want to include the rows that have the same AMOUNT_SOLD even if this causes the output to exceed 5 percent of the rows.
Which query will provide the required result?
A. SELECT prod_id, cust_id, amount_sold
FROM sales
ORDER BY amount_sold
FETCH FIRST 5 PERCENT ROWS WITH TIES;
B. SELECT prod_id, cust_id, amount_sold
FROM sales
ORDER BY amount_sold
FETCH FIRST 5 PERCENT ROWS ONLY WITH TIES;
C. SELECT prod_id, cust_id, amount_sold
FROM sales
ORDER BY amount_sold
FETCH FIRST 5 PERCENT ROWS WITH TIES ONLY;
D. SELECT prod_id, cust_id, amount_sold
FROM sales
ORDER BY amount_sold

FETCH FIRST 5 PERCENT ROWS ONLY;

Correct Answer: A

参考:http://www.itpub.net/thread-1801753-1-1.html

http://oraclescan.blogspot.com/2015/12/row-limiting-clause-for-top-n-queries.html

http://www.oratea.com/2017/02/10/oracle12c%E6%96%B0%E7%89%B9%E6%80%A7-%E5%88%86%E9%A1%B5%E6%9F%A5%E8%AF%A2top-n-sql/

最后

以上就是稳重皮带为你收集整理的1z0-071 Oracle Database 12c SQL 第9题 WITH TIES关键字的全部内容,希望文章能够帮你解决1z0-071 Oracle Database 12c SQL 第9题 WITH TIES关键字所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(45)

评论列表共有 0 条评论

立即
投稿
返回
顶部