In other words UNION ALL returns with duplicates but UNION gives the output with out duplicates. Some people use UNION to eliminate duplicates if do not want use group by and having clause.