Im having the following table, each employee has a manager, if the guy is his own manager, then the managerid field is null, I want emid name and manager id, since the name of the result table is the employee
emid name managerid
1 raj null
2 ram 1
3 ravi null
4 arvind 3
5 rithu 2
and I want to get the result as
emid name managername
1 raj raj
2 ram raj
3 ravi ravi
4 arvind ravi
5 rithu ram
kiran source
share