Bird
0
0

Which of the following statements about UNION is TRUE?

easy📝 Conceptual Q2 of 15
SQL - Set Operations
Which of the following statements about UNION is TRUE?
A<code>UNION</code> automatically sorts the result by the first column
B<code>UNION</code> can combine SELECT queries with different numbers of columns
C<code>UNION</code> requires the same number of columns in both SELECT queries
D<code>UNION</code> can only combine queries from the same table
Step-by-Step Solution
Solution:
  1. Step 1: Check column count requirement

    Both SELECT queries combined by UNION must have the same number of columns.
  2. Step 2: Verify other options

    UNION does not allow different column counts, does not require same table, and does not auto-sort results.
  3. Final Answer:

    UNION requires the same number of columns in both SELECT queries -> Option C
  4. Quick Check:

    Column count requirement = C [OK]
Quick Trick: UNION needs same number of columns in both SELECTs [OK]
Common Mistakes:
MISTAKES
  • Assuming UNION can combine different column counts
  • Thinking UNION sorts results automatically
  • Believing UNION only works on one table

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes