| UNION | UNION 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