Combining Results with UNION in MySQL

Published September 27, 2026 By Sai Sree Ram Gundepudi

Example

SELECT name FROM employees UNION SELECT name FROM contractors;

UNION ALL

SELECT name FROM employees UNION ALL SELECT name FROM contractors;

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article