Sunday, 29 July 2018

Union VS Union All


UNIONUNION ALL
UNION removes duplicate rows.“UNION ALL” does not remove the duplicate row. It returns all from all queries.
UNION uses a distinct sort“UNION ALL” does not use a distinct sort, so the performance of “UNION ALL” is slightly higher than “UNION”.
UNION cannot work with a column that has a TEXT data type.UNION ALL can work with all data type columns.

No comments:

Post a Comment