Evaluate the following SQL statement:
SQL> SELECT promo_id, promo_category
FROM promotions
WHERE promo_category = ‘Internet’ ORDER BY 2 DESC
UNION
SELECT promo_id, promo_category
FROM promotions
WHERE promo_category = ‘TV’
UNION
SELECT promo_id, promo_category
FROM promotions
WHERE promo_category =’Radio’;
Which statement is true regarding the outcome of the above query?
A.
It executes successfully and displays rows in the descending order of PROMO_CATEGORY.
B.
It produces an error because positional notation cannot be used in the ORDER BY clause with SET operators.
C.
It executes successfully but ignores the ORDER BY clause because it is not located at the end of the compound statement.
D.
It produces an error because the ORDER BY clause should appear only at the end of a compound query-that is, with the last SELECT statement.
Has anyone tried executing this query? did it throw an error as mentioned?
yes, in this kind of select statements clause ‘order by’ is allowed only at the end of whole statement.
Here are a few of the websites we advise for our visitors.
one of our visitors recently suggested the following website
check below, are some absolutely unrelated sites to ours, having said that, they may be most trustworthy sources that we use
we prefer to honor lots of other world-wide-web web pages around the web, even though they arent linked to us, by linking to them. Beneath are some webpages really worth checking out
Every after inside a while we pick blogs that we study. Listed beneath would be the most recent web pages that we select
D