In this article, I want to show you queries might sometimes return results which may look strange at first glance. You need to remember the devil is in the detail while creating queries 😈
UNION
and UNION ALL
are very similar - both combines result-set of SELECT
queries, but the final sets are different. Let me allow to show you differences.