In SQL, how do you combine the contents of 2 (or more) queries, into a single, combined table without omitting duplicates?
- UNION
- UNION ALL
- FULL JOIN
- JOIN
EXPLANATION
The difference between Union and Union all is that Union all will not eliminate duplicate rows, instead it just pulls all rows from all tables fitting your query specifics and combines them into a table. A UNION statement effectively does a SELECT DISTINCT on the results set.Here's a good, quick resource: http://www.codefari.com/2015/10/what-is-difference-between-union-and.html
0 comments:
Post a Comment