PROFESSIONAL-CLOUD-DEVELOPER · Question #61
PROFESSIONAL-CLOUD-DEVELOPER Question #61: Real Exam Question with Answer & Explanation
The correct answer is D: Use the UNION operator in SQL to combine the tables.. A is not correct because UNION ALL does not remove duplicates. B is not correct because there is no indication of a column to potentially join on. C is not correct because WITH statements simply define query results as an intra-statement D is correct because the UNION operator co
Question
You have two tables in an ANSI-SQL compliant database with identical columns that you need to quickly combine into a single table, removing duplicate rows from the result set. What should you do?
Options
- AQuery the tables from a Linux shell, combine the results into a single CSV, and re-import the rows
- BUse the JOIN operator in SQL to combine the tables.
- CUse nested WITH statements to combine the tables.
- DUse the UNION operator in SQL to combine the tables.
Explanation
A is not correct because UNION ALL does not remove duplicates. B is not correct because there is no indication of a column to potentially join on. C is not correct because WITH statements simply define query results as an intra-statement D is correct because the UNION operator combines result sets while removing duplicates.
Topics
Community Discussion
No community discussion yet for this question.