join

Definition of join in The Network Encyclopedia.

What is Join (in computer networking)?

A database operation that allows you to retrieve and modify data from more than one table at a time using a single Structured Query Language (SQL) SELECT statement.

You can use the Microsoft Query tool for Microsoft SQL Server to graphically create joins for transact-SQL queries that join two or more tables or join a table to itself.

Joins are a necessity because a single table might not provide all the information you want to retrieve about a specific database entity.

By connecting tables using joins, you can retrieve information that resides in more than one table in a single operation.

You can create three kinds of joins:

  • Inner joins:
    Connect two tables to form a result set that contains only the matching rows that satisfy the join condition. Inner joins can be equijoins or natural joins.

     

  • Cross or unrestricted joins:
    Produce a result set that contains all combinations of all rows from the tables that are joined. A cross join between a table of 5 rows and another table of 4 rows creates a result set of 20 rows.

     

  • Outer joins:
    Maintain information that does not match the join condition. For example, a left outer join contains at least all rows from the first table.

     

NOTE

There are two kinds of syntax for creating joins, ANSI join syntax and SQL Server join syntax. You can use only one of these types of syntax in a given SELECT statement.