Database Joins

You'll find article covering several types of database joins including Inner Joins and Outer Joins.


It is important to learn about both inner and outer joins and they have different matching behavior.


I would start out with our article Introduction to Database Joins.


This first article introduces the concept of joining tables.  The focus is going to be more on the type of joins, not necessarily their syntax.  


The later articles focus on the various types of joins.  Through the narrative and examples you’ll become very comfortable with each one.


Some of our more popular articles include:

Find Joins Baffling?  

Would you like some video instruction?  If so, I encourage you to check my online course Join Together Now.

This course visually walks you through the concepts.  Once  you complete the course, you'll really get joins, and advance your career.  Check this course today!

Recommended Database Join Articles

All the examples for this lesson are based on Microsoft SQL Server Management Studio and the sample databases AdventureWorks and WideWorldImporters.  You can get started using these free tools using my guide Getting Started Using SQL Server

How can I find Duplicate Values in SQL Server?
In this article find out how to find duplicate values in a table or view using SQL.  We’ll go step[...]
Use SQL Server to Create a Cross Tab Query
In this puzzle, we’re going to learn how to create a cross tab query using SQL Server.  Cross tabs are[...]
Rewrite Subquery as a Join
In this puzzle, we’re going to learn how to rewrite a subquery using inner joins.  Knowing about a subquery versus[...]
Joins vs Subqueries SQL Puzzle
In this puzzle, we’re going to learn about joins vs subqueries.  In many queries you can substitute joins and subqueries. [...]
Full Outer Join as Union
In this puzzle, we’re going to learn how to write a SQL UNION without using Set Operations.  Set operations allow[...]
How to Make a Join Easier to Read using Table Aliases
I recently put together a lesson on  table aliases and multi-table joins.  You'll find that as you write more complicated[...]
What is a Non-Equi Join in SQL and What is its Purpose?
A non-equi join can be used to solve some interesting query problems. You can use a non-equi join to check[...]
Left Join versus Right Join Comparison
I recently put together a lesson on the difference between left join versus right join operators.  Outer joins are a[...]
SQL Pivot Table – Learn to Create in Six Steps
In this episode of SQL Minute I want to share with you how to create a pivot or cross tab[...]
Use hierarchyid to query Hierarchical data
In this SQL minute we’ll look at how you can use hierarchyid to query hierarchy data.  This is a two-part[...]
SQL Server Hierarchical Query using the hierarchyid type
In this SQL minute we’ll look at how to create a SQL server hierarchical query using the hierarchyid data type. [...]
Subqueries versus Joins
Use both Joins and subqueries to query data from different tables. Though they may even share the same query plan,[...]
What Is the Difference Between a Join and a UNION?
Use joins and UNIONS to combine data from two or more tables.  Read this article to find out each command’s[...]
How do I combine results from several SQL tables (hint: there are three ways)
Many times in a relational database the information you want to show in your query is in more than one[...]
SQL Self Join
In a SQL self join the table is joined to itself.  You can think of it being like an inner[...]
SQL Inner Join
Use an SQL INNER JOIN when you need to match rows from two tables.  Rows that match remain in the[...]
SQL Cross Join
Use SQL cross joins when you wish to create a combination of every row from two tables.  All row combinations[...]
SQL Joins – The Ultimate Guide
SQL Joins are important to master. As you progress from a beginner to advanced beginner, you'll soon need to combine[...]
SQL Left Join
The SQL LEFT JOIN Includes all rows from the left table and those that match from the right table. When the right table doesn't[...]