Last answered:

21 Apr 2020

Posted on:

15 Apr 2020

0

UNION vs UNION ALL

Hello Team, Can you please give me an example of when or how we can use this two commands? To be honest, it was not clear the usage in the video Thank you!!
1 answers ( 0 marked as helpful)
Instructor
Posted on:

21 Apr 2020

0
Hi Miguel! Thanks for reaching out and pointing this out. UNION or UNION ALL add, or, better, unify data from different tables. However, it is important that these tables are of the same length and contain the same column names. Here, the records are combined vertically, so you can think of the first table being vertically extended by the content of the other table(s) you are unifying it with. The difference between UNION and UNION ALL is that UNION removes duplicate data, while UNION ALL doesn't. Practical examples have been provided in the lecture but since you are requesting for more, I will mark your comment and work on this the next time we are updating the course! Hope this helps.
Best,
Martin

Submit an answer