Page 1 of 1

Evaluate the following SQL statement:SELECT 2 col1,ycol2 -FROM dual -UNION -SELECT 1 ,'x'FROM dual -UNION -SELECT 3 .NUL

Posted: Wed Jun 07, 2023 6:11 am
by answerhappygod
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 execute and the order of the values in the first column would be 3,2,1.
B. It would execute and the order of the values in the first column would be 1,2,3.
C. It would not execute because the column alias name has not been used in the ORDER BY clause.
D. It would not execute because the number 2 in the ORDER BY clause would conflict with the value 2 in the first SELECT statement.