SQL Basics Practice Test

Access More Questions
Which operator lets you combine two SELECT statements into one, requiring the same number of output fields in the same order?
Correct Answer:
UNION
Explanation:
Union is used to combine two SELECT results into one result set, as long as both queries return the same number of columns in the same order. It effectively stacks the rows from both queries into a single list. By default, duplicates are removed, so you get each distinct row once; if you want to keep duplicates, use UNION ALL. The other options work differently: JOIN merges related rows from two tables side by side based on a condition, not simply stacking results; INTERSECT returns only rows that appear in both result sets; DIFFERENCE (or EXCEPT/MINUS) returns rows that appear in the first result but not in the second.

Access more questions from this quiz

Continue to SQL Basics Practice Test for more practice questions and the full quiz experience.

Access More Questions