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

What is the sql case statement used for? Explain with an example?

992


What are the advantages of using third-party tools?

994


After creating the cube, if we added a new column to the oltp table then how you add this new attribute to the cube? : sql server analysis services, ssas

958


Why use “pivot” in sql server?

1113


How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?

1089


What are the reporting services components?

142


What is the data tier application?

169


What is indexed view?

979


Do you know what guidelines should be followed to help minimize deadlocks?

970


When you use @@error and try-catch?

1043


Can you explain what is sql server english query?

994


What is a cube? : sql server analysis services, ssas

997


How the authentication mode can be changed?

1132


What is the stuff?

1000


How to check if stored procedure is running in sql server?

1056