| officeid | officename | addressline1 | addressline2 | city | state | country | pincode | Table: office mysql> SELECT * FROM office In this tutorial we will be using the office and employeeaddress table.
Where, column_name must be of same type and same order in both the SELECT statements. Syntax of UNION mysql> SELECT column_name FROM table_a
We use the UNION operator when we want to combine the results of multiple SELECT query.įollowing are the points to note when using UNION in a query. In this tutorial we will learn about union and union all in MySQL.