From the course: Microsoft SQL Server 2016: Query Data
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Understanding joins - SQL Server Tutorial
From the course: Microsoft SQL Server 2016: Query Data
Understanding joins
- [Instructor] In this lesson, we'll take a look at a concept of a join. Joins are used to create a single result set of records from multiple tables. Because relational database management systems use normalization and split the data into multiple tables, joins are a required element in queries that need to extract data from these different tables. In essence, a join is the mechanism you use to tell SQL Server what field to use from one table to locate and select records from a related table. Remembering the concept of foreign keys, they are a key in one table that equates to a primary key in another table. This key establishes the relationship between the tables. Joins typically use a logical operator such as equals or the not equal when comparing the columns, but they can also use other operators such as LIKE, IN, and BETWEEN. These operators will be covered in the next lesson where we focus on using joins in a query. Joins come in various forms. The default is known as an INNER…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.