Combining Results with UNION in MySQL

Published July 26, 2025 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