Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Explain SELF JOIN ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which rendering formats are affected by the pagesize properties?

151


What is dbcc?

1179


how you can list all the tables in a database?

1067


What does REVERT do in SQL Server 2005?

1011


How to receive returning result from a query?

1189


Tell me about pre-defined functions of sql?

1155


What do you mean by sql server 2005 express management tools?

1351


What is difference between index and primary key?

1136


what is a transaction? : Sql server database administration

1048


What are the different types of subquery?

1200


What is a virtual table in sql?

1035


What is the use of floor function in sql server?

1126


What is view in sql?

950


How to name query output columns in ms sql server?

1013


When to use null data driven subscription?

213