点滴的幸福

努力,让自己变得不平凡!

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/

阅读更多

扫码向博主提问

去开通我的Chat快问

u013012406

非学,无以致疑;非问,无以广识
文章标签: 1z0-071 ocp oracle 11g
个人分类: 1z0-071
想对作者说点什么? 我来说一句

1Z0-071考试指南

2018年06月07日 65.12MB 下载

精通Oracle Database 12c SQL PDF

2017年05月19日 49B 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭