Rules for UNION queries
QuizMediumAsked in: Cognizant, CVS Health
Pick every true statement about SELECT ... UNION SELECT ....
- Both queries must return the same number of columns
- The result takes its column names from the first query
- One ORDER BY at the end sorts the whole combined result
- Columns are matched by name, so their order in each query does not matter
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.