Introduction:
Here
I will explain how to write self join query in SQL server and self join example
in SQL server.
Description:
In
previous article I explained about Joins in SQL Server and many more articles relating to SQL
Server. Now I will explain about self join in SQL
Server.
Self Join
Joining the table itself called self join. Self join is
used to retrieve the records having some relation or similarity with other
records in the same table. Here we need to use aliases for the same table to
set a self join between single table and retrieve records satisfying the
condition in where clause.