View the Exhibit and examine the data in the PROMO_CATEGORY and PROMO_COST columns
of the PROMOTIONS table.
Evaluate the following two queries:
SQL>SELECT DISTINCT promo_category to_char(promo_cost)”code”
FROM promotions
ORDER BY code;
SQL>SELECT DISTINCT promo_category promo_cost “code”
FROM promotions
ORDER BY 1;
Which statement is true regarding the execution of the above queries?
A.
Only the first query executes successfully.
B.
Only the second query executes successfully.
C.
Both queries execute successfully but give different results.
D.
Both queries execute successfully and give the same result.
Explanation:
Note: You cannot use column alias in the WHERE clause.