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 |
Can we use where clause in union?
How can you see what type of locks used?
What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas
What is the default sql server instance name?
What is use of except clause? How does it differ from not in clause?
which query u can write to sql server doesn't work inbetween 7.00PM to nextday 9.00AM
List some of the rules that apply to creating and using a ‘view’
Why we need to use secondry database file? though, we can do same work using primary database file also.
How to retrieve duplicate rows in a table? How to delete the duplicate entries in a table?
15 Answers Leo Technologies, Mannar Company, Synechron,
What is the primary use of the model database?
What is the difference between a fill factor of 100 and 0?
What is order of B+tree?