SELECT Name FROM Employees
UNION
SELECT Name FROM Managers;Both UNION and UNION ALL combine the result of two or more
SELECTqueries into a single list, but UNION removes duplicate rows, whereas UNION ALL keeps all rows including duplicates.Because
UNIONmust sort or hash the data to find and remove duplicates,UNION ALLis significantly faster and uses less memory.