Last answered:

12 Oct 2022

Posted on:

11 Oct 2022

2

Union -vs- Join

The difference Between UNION and JOIN is



join
column 1 + colunm2

= 2 columns



while union

column 1 + column 2

= 1 column                of the 2 columns' values

1 answers ( 0 marked as helpful)
Instructor
Posted on:

12 Oct 2022

2

Hi Peter!
Thanks for reaching out.
There is a major difference between JOIN and UNION/UNION ALL in SQL. Using the JOIN clause, we combine the attributes of two given relations and, as a result, form tuples. Whereas we use the UNION clause when we want to combine the results obtained from two queries. They both combine data differently.



Hope this helps.
Best,
Tsvetelin

Submit an answer