From the course: Querying Microsoft SQL Server 2022

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Left, right, and full outer joins

Left, right, and full outer joins - SQL Server Tutorial

From the course: Querying Microsoft SQL Server 2022

Left, right, and full outer joins

- [Instructor] The three outer join types all retrieve these same rows as an inner join, plus some additional rows that an inner join excludes. If I run a select statement against the person table we can find out how many people there are. I'll grab the business entity ID, person type, first name and last name columns from the person table. This returns total of 19,972 rows. This corresponds to a single row for every person in the table. The person type includes a code that defines the kind of person each one is. So we have a number of employees with the EM code and if I scroll through here we'll see some additional people that are not employees. For instance, we have some independent contractors and some subcontractors and so on. Scrolling through the list, you'll see the different types. Now we can execute another query against the human resources, that employees table. To find information about specifically just the…

Contents