Explain SELF JOIN ?
Answers were Sorted based on User's Feedback
SELF JOIN is like joining a table with itself, to get a recursive series of data within the table. Like in Employee table to get Manager details you need to join Manager ID with Employee ID in the same table, like:
SELECT
E.EmployeeID,
E.EmployeeName,
E.ManagerID,
M.EmployeeName as ManagerName
FROM Employee E
LEFT JOIN Employee M
ON M.EmployeeID = E.ManagerID
~Manoj(SQLwithManoj.wordpress.com)
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / dinesh rathod
Self join is just like any other join, except that two instances of the same table will be joined in the query
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sandhya
JOINING TO TABLE ITSELF IS CALLED SELF JOIN. HERE WE ARE USING THE SAME TABLE WITH DIFFERENT ALIYAS'S.
Is This Answer Correct ? | 1 Yes | 1 No |
From where can you change the default port?
What is stretch database in sql server?
why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it? : Sql server administration
Working with TLogs
What are the hotfixes and patches in sql server?
What is Right Outer Join?
What stored procedure would you use to view lock information?
When multiple after triggers are attached to sql table, how to control the order of execution?
How to update multiple rows with one update statement in ms sql server?
Explain the difference between cross join and full outer join?
What is the need for group functions in sql?
What are three ways you can use an identity value inside a trigger? Why would you prefer one way over another?