Self join correlates rows of a table with the other rows of the same table. It is used when a table has to be joined to itself to produce results.
First you have to create a table EmpTable and enter the details like this:
EmpID EmpName EmpMgrID
1 Smith 2
2 Sai 3
3 Suresh 1
4 Bill 2
5 Steve 4
SELECT E2.EMPNAME,E1.EMPNAME as 'MANAGER'
FROM EmpTable E1
INNER JOIN EmpTable E2ON E1.EMPID=E2.EMPMGRID