From the course: SQL Server Fundamentals: Master Basic Query Techniques

Unlock the full course today

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

Multiple inner joins

Multiple inner joins - SQL Tutorial

From the course: SQL Server Fundamentals: Master Basic Query Techniques

Start my 1-month free trial

Multiple inner joins

- [Instructor] Looking back at our ERD from the last video, we've already established the connection between the product table and the oil flavor table via the flavor ID. But now, let's take a look at how to incorporate the product type table. We can see here that we have a foreign key relationship between the product table and the product type table through the product type ID. So we'll keep that in mind as we're adding to our query. So we're going to pick up with the same query that we left off with in our last video, but we're going to add the product type table to get the additional information available there. So we're going to do the same thing as we did with the oil flavor table. So we're going to do an inner join to dbo product type and I'm going to go ahead and use the table alias again. And theoretically, I could either join to this new table from either the product table or the oil flavor table. So anything that has been brought into the query previously is fair game for…

Contents