Hello friends
can you tell me .what is self join in sql (with example).how we use it.
Thanks in advance
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Nilesh JadavRank #109 · 20.3K reputationPosted Jun 2, 2015, 4:07 AM EDT
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.
Here is the link just check it out : self join query in sql server | self join example in sql server
hope it works for you. Mark accepted if it works. Thank you !