分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow
11. 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
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 parenthese s are removed from the above statement?
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 parenthese s 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. 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.
sh@TESTDB> SELECT prod_name, prod_list_price -(prod_list_price*(25/100)) 2 +(prod_list_price -(prod_list_price*(25/100))*(15/100))+100 3 AS "TOTAL PRICE" 4 FROM products where rownum<6 5 order by "TOTAL PRICE";PROD_NAME TOTAL PRICE-------------------------------------------------- -----------Y Box 613.7328755MP Telephoto Digital Camera 1641.2328817" LCD w/built-in HDTV Tuner 1812.48288Envoy 256MB - 40GB 1812.48288Mini DV Camcorder with 3.5" Swivel LCD 1983.73288
去除括号后:
sh@TESTDB> SELECT prod_name, prod_list_price -prod_list_price*25/100 2 +prod_list_price -prod_list_price*25/100*15/100+100 3 AS "TOTAL PRICE" 4 FROM products where rownum<6 5 order by "TOTAL PRICE";PROD_NAME TOTAL PRICE-------------------------------------------------- -----------Y Box 613.7328755MP Telephoto Digital Camera 1641.2328817" LCD w/built-in HDTV Tuner 1812.48288Envoy 256MB - 40GB 1812.48288Mini DV Camcorder with 3.5" Swivel LCD 1983.73288
虽然计算顺序不一样,但计算结果是一样的
此题答案选:B
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow