From the course: Querying Microsoft SQL Server 2019

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Table joins and relationships

Table joins and relationships - SQL Server Tutorial

From the course: Querying Microsoft SQL Server 2019

Start my 1-month free trial

Table joins and relationships

- [Instructor] Relational databases are efficient for storing data because they minimize redundancy. They do this by splitting information up and storing it in multiple related tables. This allows the database to compartmentalize data but requires users to join records back together again when they want to review information that's been spread out across several tables. There are four different kinds of joins you can make between two tables in your sql queries. They're an inner join, left outer join, right outer join, and a full outer join. Let's talk about each one of these in order. The first and by far most common join that you can create between two related tables is called an inner join. In fact, it's the default join type in SQL Server. So if you're not specific about what kind of join you're asking for, the query agent will assume that it's an inner join. This is how it works. Assume we have one table of records…

Contents