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 does the on delete cascade option do?

1012


What is pessimistic concurrency?

970


Is it possible to create trigger on views?

967


What are the events recorded in a transaction log?

991


What are truncate options available in sql server? : sql server database administration

1018


What is table valued function and scalar valued functions?

1075


What are the purpose of Normalisation?

1047


How to set database to be single_user in ms sql server?

1019


what are user defined datatypes and when you should go for them? : Sql server database administration

1004


How to create a trigger for insert only?

1031


How to select some specific columns from a table in a query in ms sql server?

996


What new data source types were added in ssrs 2014?

160


Write a program to fetch first 10 records from a file?

997


List the data types available in mssql?

1025


Tell me what is difference between clustered and non clustered index?

941