COF-C02 · Question #257
A Snowflake user has two tables that contain numeric values and is trying to find out which values are present in both tables. Which set operator should be used?
The correct answer is A. INTERSECT. The INTERSECT set operator returns only the rows that appear in both result sets - exactly what is needed to find values present in both tables. UNION combines all rows from both tables (with deduplication). MINUS (or EXCEPT) returns rows in the first result set that are not in…
Question
A Snowflake user has two tables that contain numeric values and is trying to find out which values are present in both tables. Which set operator should be used?
Options
- AINTERSECT
- BMFRCK
- CMINUS
- DUNION
How the community answered
(61 responses)- A93% (57)
- B2% (1)
- C3% (2)
- D2% (1)
Explanation
The INTERSECT set operator returns only the rows that appear in both result sets - exactly what is needed to find values present in both tables. UNION combines all rows from both tables (with deduplication). MINUS (or EXCEPT) returns rows in the first result set that are not in the second. MFRCK is not a valid SQL set operator.
Topics
Community Discussion
No community discussion yet for this question.