首页 > 数据库 > Oracle > OCP 1Z0-051-52
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.
解析:Where子句中不能使用列别名
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1160687/ ,如需转载,请注明出处,否则将追究法律责任。