一、原题
二、题目翻译
View the Exhibit and examine the structure of the PRODUCTS table.
All products have a list price.
You issue the following command to display the total price of each product after a discount of 25% and a tax of 15% are applied on it. Freight charges of $100 have to be applied to all the products.
SQL>SELECT prod_name,
prod_list_price -(prod_list_price*(25/100)) +(prod_list_price -(prod_list_price*(25/100))*(15/100))+100
AS "TOTAL PRICE"
FROM products;
What would be the outcome if all the parentheses are removed from the above statement?
![]()
A. It produces a syntax error.
B. The result remains unchanged.
C. The total price value would be lower than the correct value.
D. The total price value would be higher than the correct value.
答案:B
二、题目翻译
查看下面PRODUCTS表的结构
所有产品有一个价格列表
执行下面这条命令显示每个产品打折25%和交15%税后的总价格,每个产品会有$100的运费。
如果上面这条语句的括号全都去掉,会输出什么?
A. 报语法错误
B. 结果不变
C. 总价格将低于正确值
D. 总价格将高于正确值
因为括号里面都是乘除运算,去掉括号后虽然计算顺序稍微变化,但是不影响结果,结果还是和原来一样。