Combine query results with set operators

Advanced
Data Analyst
Data Engineer
Data Scientist
Database Administrator
Developer
Solution Architect
Student
Azure SQL Database
Azure SQL Managed Instance
SQL Server on Azure Virtual Machines
Azure SQL Server on Virtual Machines
SQL Server

Learn how to use Transact-SQL to combine query results.

Learning objectives

After completing this module, you’ll be able to:

  • Use the UNION operator.

  • Use the INTERSECT and EXCEPT operators.

  • Use the APPLY operator.

Prerequisites

Before starting this module, you should have experience of using Transact-SQL queries to retrieve and filter data from a table in a database.