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 |
What is extended stored procedures?
How to rename an existing table with the "sp_rename" stored procedure in ms sql server?
Can we rollback records deleted by a truncate statement?
3 Answers CarrizalSoft Technologies, United Healthcare,
Is there any difference between primary key and unique with the not null condition?
What are the advantages of user defined function?
What are scheduled tasks in sql server?
Tell me what is use of except clause? How it differs from not in clause?
Explain different types of index?
what is the diffrence between Snap Shot and Transaction Replication
Do you know what is normalization of database? What are its benefits?
you have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem? : Sql server administration
Define constraints and give an example of their use?
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)