Explain SELF JOIN ?

Answers were Sorted based on User's Feedback



Explain SELF JOIN ?..

Answer / manoj pandey

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

Explain SELF JOIN ?..

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

Explain SELF JOIN ?..

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

Post New Answer

More SQL Server Interview Questions

where can you add custom error messages to sql server? : Sql server administration

0 Answers  


What are all new concepts in SQL Server 2008? That is Exactly Difference between 2005 to 2008

2 Answers   IBM,


What is the difference between 2-Tier architecture and 3-Tier architecture

15 Answers   CTS, MCN Solutions, Oracle,


you have separate development and production systems you want to move a copy of a development database into production to do this, you do a backup on the development system and restore to the production system after a few minutes, you begin getting calls from several customers saying that they are denied access to the system why? : Sql server administration

0 Answers  


What is the default server name for sql server?

0 Answers  






Write a sql query to display the current date?

0 Answers  


How to list all objects in a given schema?

0 Answers  


is it possible to use a variable in a query with the IN clause (a,b,c..z), without getting quotes or conversion errors?

2 Answers  


What is full form of XP ?

42 Answers   Cap Gemini, Infosys, Microsoft, Oracle, Reliance,


A successfully created SSIS package in SQL Server 2005 runs fine in MS BIDS and Integration Services. But gives error when run through an SQL-Job. What are the possible reasons?

2 Answers   Sapient,


Which system table contains information on constraints on all the tables created?

2 Answers  


What part does database design plays a role in performance of an sql server-based application?

0 Answers  


Categories