SQL Joins   «Prev  Next»
Lesson 8UNION
ObjectiveCreate an SQL statement that will create the join specified.

How to perform UNION in SQL?

The UNION operator lets you combine the results of SELECT statements from multiple tables. For example, if you have a table that contains store location information, you may have more than one of these tables, one for each location. You can use the UNION join to get a single listing that shows the store information from all locations in one results set:

SELECT * FROM Store1 
UNION SELECT * FROM Store2

The UNION operator will automatically remove duplicate information for you. It can be helpful if you find yourself working with distributed tables wanting to get a comprehensive view of what is in them.
We have covered a lot of material about joins in the last several lessons. Complete this exercise to see if you can do a more advanced join.

Advanced Join - Exercise