SQL - Set Operations
Find the mistake in this query:
SELECT name FROM table1 UNION SELECT name FROM table2 ORDER BY table1.name;SELECT name FROM table1 UNION SELECT name FROM table2 ORDER BY table1.name;After UNION, the result is a combined set without table aliases.
ORDER BY cannot reference original table aliases; must use column names only.
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions