Joining Two Tables in a Single Query in SQL Server

Q

How To Join Two Tables in a Single Query in SQL Server?

✍: FYIcenter.com

A

Two tables can be joined together in a query in 4 ways:

  • Inner Join: Returns only rows from both tables that satisfy the join condition.
  • Left Outer Join: Returns rows from both tables that satisfy the join condition, and the rest of rows from the first (left) table.
  • Right Outer Join: Returns rows from both tables that satisfy the join condition, and the rest of rows from the second (right) table.
  • Full Outer Join: Returns rows from both tables that satisfy the join condition, the rest of rows from the first (left) table, and the rest of rows from the second (right) table.

 

⇒ "INNER JOIN ... ON" - Writing Queries with Inner Joins in SQL Server

⇐ Using SELECT Statements with Joins and Subqueries in SQL Server

⇑ Using SELECT Statements with Joins and Subqueries in SQL Server

⇑⇑ SQL Server Database Tutorials

2016-10-30, 2981🔥, 0💬