MS SQL Server Joins Question:

Download Job Interview Questions and Answers PDF

What is self join in SQL server joins?

SQL Server Joins Interview Question
SQL Server Joins Interview Question

Answer:

This is a particular case when one table joins to itself, with one or two aliases to avoid confusion. A self join can be of any type, as long as the joined tables are the same. A self join is rather unique in that it involves a relationship with only one table. The common example is when company has a hierarchal reporting structure whereby one member of staff reports to another. Self Join can be Outer Join or Inner Join.

Download SQL Server Joins Interview Questions And Answers PDF

Previous QuestionNext Question
What is full outer join in SQL server joins?Can you please explain the difference between primary keys and foreign keys?