AI engineering glossary · SQL databases
What is UNION?
UNION (also called UNION ALL): A set operator that stacks the results of two queries with the same column layout into one, removing duplicates. UNION ALL keeps duplicates and is faster because it skips the duplicate check.
UNION: an example
Combining customers from a Mumbai table and a Delhi table into one list with UNION ALL.
Related terms
More SQL databases terms
Where you learn it
UNION is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.