You want to display inventory id numbers and their descriptions with these desired results:
1. The price of the item must be 8.25 or .25.
2. The display must be sorted alphabetically by the item description.
3. The items must have been ordered prior to June 10, 1997.
Evaluate this SQL script:
SELECT id_number, description
FROM
inventory
WHERE price IN (8.25, 0.25)
ORDER BYdescription desc;
What does the proposed solution provide?
a.
one of the desired results
b.
two of the desired results
c.
all of the desired results
d.
no results because the statement will not execute
为什么答案是A, 难道The display must be sorted alphabetically by the item description.不满足吗?
答案是A。因为只满足了PRICE IN(8。25,0。25),如果在ORDER BY中没有DESC,那就满足了B。 ORDER BY col_name ASC=ORDER BY col_name,result is sorted alphabetically by the item description.