How to Work With Union in SQL
In this article I am going to explain about how to work with union in SQL.
Here I am going to explain how to retrieve data from more than than one table. Join operator is used to fetch data from two or more than two table. There is an other way to retrieve data from more than one table into result set known as union. Here we use union to fetch data from two different tables in result set table.
Each result set in union must return same number of columns and corresponding columns in result set must have same data type. Union combine data from two or more result set into one result set.
A Statement that create mcninvoices table
Statements that insert data in mcninvoices table
A Statement that is used to fetch data from mcninvoices table
A Statement that using Union