Databases & SQL vocabulary · SQL Statements and Queries

UNION

Meaning in databases & SQL, with examples

/ˈjuːnjən/nounCommon term

In databases & SQL, UNION means: A SQL operator that stacks the results of two or more SELECT statements into one result, one under the other, removing duplicate rows.

In Turkish: birleşim, UNION

How it is used

Each SELECT must return the same number of columns with compatible types. UNION ALL keeps duplicates and is faster, because the database does not have to check for them; use it when duplicates are impossible or wanted. A join puts columns side by side; a UNION puts rows on top of each other.

Example sentences

  1. We UNION the archived orders with the current ones to build the yearly report.

  2. Switch to UNION ALL here; the two tables can't contain the same rows anyway.

Common collocations

  • UNION ALL
  • UNION of two queries
  • UNION vs JOIN
  • combine results

This word in other fields

The same English word can have a different meaning in another field:

More terms: SQL Statements and Queries

Practise with graded reading

Reading at the right level is the fastest way to make new words stick. Pick free English books by level: