Skip to main content

SQL UNION Clause With Example

SQL UNION Clause

  • UNION combines the result sets of two queries.
  • Column data types in the two queries must match.
  • UNION combines by column position rather than column name


The SQL UNION syntax


The general syntax is:
  1. SELECT column-names FROM table-name UNION SELECT column-names FROM table-name

SQL UNION Examples

Comments