ITPub博客

首页 > 数据库 > Oracle > OCP 1Z0-051-52

OCP 1Z0-051-52

原创 Oracle 作者:LuiseDalian 时间:2014-05-14 07:08:28 0 删除 编辑
(52)View the Exhibit and examine the structure of the PRODUCTS table.

Using the PRODUCTS table, you issue the following query to generate the names, current list price, and discounted list price for all those products

whose list price falls below $10 after a discount of 25% is applied on it.

SELECT prod_name, prod_list_price,

       prod_list_price - (prod_list_price * .25) "DISCOUNTED_PRICE"

FROM products

WHERE discounted_price < 10;

The query generates an error. What is the reason for the error?



A. The parenthesis should be added to enclose the entire expression.

B. The double quotation marks should be removed from the column alias.

C. The column alias should be replaced with the expression in the WHERE clause.

D. The column alias should be put in uppercase and enclosed with in double quotation marks in the WHERE clause.


答案:(C)

解析:Where子句中不能使用列别名


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

上一篇: OCP 1Z0-051-53
下一篇: OCP 1Z0-051-55
请登录后发表评论 登录
全部评论

注册时间:2012-02-06

  • 博文量
    1986
  • 访问量
    6043364