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 |
Where sql server usernames and passwords are stored in a sql server?
What is the difference between varchar and varchar types?
How to display a past time in days, hours and minutes?
What are magic tables in sql server?
What is the full form of ddl?
What is a trigger? Why we need it?
What are the basic features of a trigger in ms sql server?
Explain the difference between functions and stored procedures in sql server?
Explain how many types of relationship?
What is the largest component inside a field?
What command would you use to add a column to a table in sql server?
can foreign key take role of primary key?
5 Answers CarrizalSoft Technologies, TCS, Villa Marie,
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)