MemberSeptember 11, 2020 at 3:34 am
<p style=”text-align: left;”>A self join is the one which can be used to join a table itself without depending on any other.</p>
It is useful to compare rows or query the data within the table.
A self join also use inner join(return rows when there is a match in both rows) and left join(return all rows from the left table even if there are no matches in the right table).
Self join syntax:
FROM table1 T1, table1 T2
T1,T2 are the different table aliases for the same table.