UNION clause is used to combine results that appear from multiple
SELECT statements and filter duplicates.
For example, given a
first_names table with a column
name containing rows of data “James” and “Hermione”, and a
last_names table with a column
name containing rows of data “James”, “Hermione” and “Cassidy”, the result of this query would contain three
names: “Cassidy”, “James”, and “Hermione”.
SELECT name FROM first_names UNION SELECT name FROM last_names