ITPub博客

首页 > 数据库 > Oracle > Oracle Certificate Profession 1Z0-051-14

Oracle Certificate Profession 1Z0-051-14

原创 Oracle 作者:LuiseDalian 时间:2014-05-09 07:51:42 0 删除 编辑
(14)Using the CUSTOMERS table, you need to generate a report that shows 50% of each credit amount in each income level.

The report should NOT show any repeated credit amounts in each income level. Which query would give the required result?

A.SELECT cust_income_level, DISTINCT cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers;

B. SELECT DISTINCT cust_income_level, DISTINCT cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers;

C.SELECT DISTINCT cust_income_level || cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers;

D. SELECT cust_income_level || cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers;


答案:(C)

解析:

A. DISTINCT关键字只能出现在第一列之前。

B. 一个SELECT语句上只能出现一个DISTINCT关键字



来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1157185/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-02-06

  • 博文量
    1986
  • 访问量
    6040940