SQL Server 2005 join types fall into three categories: inner, outer, and cross. : Table Join « Table Join « SQL Server / T-SQL Tutorial






Inner joins use the INNER JOIN keywords. 
INNER JOIN operates by matching common values between two tables. 
Only table rows satisfying the join conditions are used to construct the result set. INNER JOINs are the default JOIN type.
You can use just the JOIN keyword in your INNER JOIN operations.

Outer joins have three different join types: LEFT OUTER, RIGHT OUTER, and FULL OUTER joins. 
LEFT OUTER and RIGHT OUTER JOINs return rows that match the conditions of the join condition. 
LEFT OUTER JOINs return unmatched rows from the first table of the join pair.
RIGHT OUTER JOINs return unmatched rows from the second table of the join pair. 
The FULL OUTER JOIN clause returns unmatched rows on both the left and right tables.

A CROSS JOIN returns a Cartesian product when a WHERE clause is not used. 
A Cartesian product produces a result set based on every possible combination of rows from the left table, multiplied against the rows in the right table. 
If the table A has 7 rows, and the table B has 22 rows, you would receive 154 rows (or 7 times 22) in the query results.








4.1.Table Join
4.1.1.SQL Server 2005 join types fall into three categories: inner, outer, and cross.
4.1.2.Selecting authors and titles using only joins.
4.1.3.A SELECT statement that joins the Bankers and Billings tables
4.1.4.Joining Tables in the WHERE Clause (not ANSI standard)
4.1.5.Using the GROUP BY Clause
4.1.6.Joining three tables.
4.1.7.Joins and Subqueries
4.1.8.Left and Right Outer Joins
4.1.9.Joining Tables in the FROM Clause (ANSI standard)
4.1.10.Table Aliasing
4.1.11.Join tables with two columns
4.1.12.The result of the previous join is then joined to another table
4.1.13.SQL-92 Three-Way Inner Joins
4.1.14.Forcing the Order of Join Processing