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?
A.
Use the JOIN operator in SQL to combine the tables.
B.
Use nested WITH statements to combine the tables.
C.
Use the UNION operator in SQL to combine the tables.
D.
Use the UNION ALL operator in SQL to combine the tables.
C is correct answer here.
The only difference between Union and Union All is that Union All will not removes duplicate rows or records, instead, it just selects all the rows from all the tables which meets the conditions of your specifics query and combines them into the result table.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
saurabh1805
Highly Voted 3 years, 5 months ago__rajan__
Most Recent 7 months, 1 week agoash_meharun
1 year, 4 months agotomato123
1 year, 8 months agowilwong
2 years, 9 months agosyu31svc
2 years, 10 months ago