MS SQL Server Concepts and Programming Question:
Download Questions PDF

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

Answer:

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.


Download MS SQL Server Interview Questions And Answers PDF

Previous QuestionNext Question
How To Delete All Rows with TRUNCATE TABLE Statement in MS SQL Server?How To Write a Query with an Inner Join in MS SQL Server?