Union All Rows Including Duplicates
Last updated
Was this helpful?
Last updated
Was this helpful?
Two tables or sets of results can be joined together into a single result set using . When combining results with union
, all duplicate rows will be removed from its result.
Notice that despite both sides of the union
having their own 3 and 4, those values each only show up once in the result.
If we don't want duplicates to be excluded, we can use union all
.
In this case we have 8 rows instead of 6 with the values 3 and 4 each appearing twice.