Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Introducing the SQL commands that allow us to perform relatively complex set operations on a database.
As with the other topics we’ve covered in this series, there is a wealth of information available on the topic of sets, databases, and SQL.
We'll get into the following topics in this stage, but here are a few links that talk a little more about Set Operations in SQL:
- What is the difference between a JOIN and a UNION?
- Learn to use UNION, INTERSECT, and EXCEPT Clauses
Other good reads about Set Operations include:
Union and Union All:
In our last stage,
we learned how to merge dates together from two different tables with SQL Joins.
In this stage, we're going to learn about set operations.
Set operations allow you to perform different tasks on separate tables or
You can use these operations to combine two or
more datasets into one in various ways or to limit the results of one with another.
There are four set operations, Union, Union All, Intersect and Except.
Union and Union All combine data from multiple tables into one result set.
Intersect produces a result set from values of rows that's are in common
between both tables.
And except produces a result set of values of rows that exist in the first table,
but not the second.
Will be taking a look at these set operations in more detail in this stage.
You need to sign up for Treehouse in order to download course files.Sign up