Which statement is true regarding the output of the SQL statement?

Evaluate the following SQL statement: SELECT 2 col1,ycol2 FROM dual UNION SELECT 1
,’x’ FROM dual UNION SELECT 3 .NULL FROM dual ORDER BY 2; Which statement is
true regarding the output of the SQL statement?

Evaluate the following SQL statement: SELECT 2 col1,ycol2 FROM dual UNION SELECT 1
,’x’ FROM dual UNION SELECT 3 .NULL FROM dual ORDER BY 2; Which statement is
true regarding the output of the SQL statement?

A.
It would not execute because the number 2 in the ORDER BY clause would conflict with
the value 2 in the first SELECT statement.

B.
It would execute and the order of the values in the first column would be 3,2,1.

C.
It would execute and the order of the values in the first column would be 1,2,3.

D.
It would not execute because the column alias name has not been used in the ORDER

BY clause.



Leave a Reply 0

Your email address will not be published. Required fields are marked *