Bird
0
0

Which of the following correctly demonstrates how to combine two SELECT statements using UNION in SQL?

easy📝 Syntax Q3 of 15
SQL - Set Operations
Which of the following correctly demonstrates how to combine two SELECT statements using UNION in SQL?
ASELECT column1 FROM table1 UNION table2;
BSELECT column1 FROM table1 UNION SELECT column1 FROM table2;
CSELECT column1 FROM table1 AND SELECT column1 FROM table2;
DSELECT column1 FROM table1 JOIN SELECT column1 FROM table2;
Step-by-Step Solution
Solution:
  1. Step 1: Understand UNION syntax

    The UNION operator combines the results of two SELECT statements.
  2. Step 2: Check correct syntax

    Each SELECT must be complete and separated by UNION keyword.
  3. Final Answer:

    SELECT column1 FROM table1 UNION SELECT column1 FROM table2; -> Option B
  4. Quick Check:

    Both SELECTs are complete and combined correctly [OK]
Quick Trick: Each SELECT must be complete before UNION [OK]
Common Mistakes:
MISTAKES
  • Omitting SELECT in second query
  • Using AND or JOIN instead of UNION
  • Not separating queries properly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes