Hi Friends
What is Self Join in SQL ?
Loading
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
Shankar MRank #874 · 2.5K reputationPosted Nov 23, 2012, 1:34 AM EST
Self - Join is joining a table to itself,considering each as individual tables usually with an alias name to differentiate each other.
Generally, we will write Self-join like this,
Vithal WadjeRank #19 · 47.2K reputationPosted Nov 23, 2012, 1:39 AM EST
Sivaraman DhamodaranRank #40 · 34.5K reputationPosted Nov 23, 2012, 2:26 AM EST
Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 23, 2012, 4:02 AM EST
When all of the data you want to retrieve is contained within a single table, but data needed to extract is related to each other in the table itself.
http://hightechpost.blogspot.in/2011/07/self-join-in-sql-server.html
http://learnsqlserver.in/3/Self-Join.aspx
http://www.sql-statements.com/sql-self-join.html
http://www.sqltutorial.org/sqlselfjoin.aspx
rasul moh64 reputationPosted Nov 23, 2012, 10:15 PM EST
SELECT column_name(s)
FROM table_name1
FULL JOIN table_name2
ON table_name1.column_name=table_name2.column_name
and also go http://www.w3schools.com/sql/sql_join.asp many query will available.
Please tick correct answer