Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLUNION vs UNION ALLSingle-choice MCQ

Which statement about how an ORDER BY and the column names apply to a UNION query is correct?

SELECT a AS x FROM t1 UNION ALL SELECT b AS y FROM t2 ORDER BY x;