MySQL UNION Keyword

MySQL UNION Keyword allows you to combine two or more result sets from multiple tables or queries together.

  • The number of columns in each SELECT statement has to be the same .
  • The data type of the column in the column list of the SELECT statement must be the same or at least convertible.

MySQL UNION removes all duplicate rows from the result set

Syntax: