New course! Every coder should learn Generative AI!
Try a free lesson0
Union and distinct
some times you can see statements with union all and distinct. But it's easier and better for performsnce to use union instead of union all and distinct.
1 Answer
0
Hello,
Distinct and Union clauses are totally different clauses. If you need a fast return on the query you must use union all.
https://stackoverflow.com/questions/35627923/union-versus-select-distinct-and-union-all-performance