How to execute UNION without sorting? (SQL)
I notice this question gets quite a lot of views so I’ll first address a question you didn’t ask! Regarding the title. To achieve a “Sql Union All with “distinct”” then simply replace UNION ALL with UNION. This has the effect of removing duplicates. For your specific question, given the clarification “The first query should … Read more