mercredi 11 octobre 2017

fetch the recursive data in sql query

I have the table user which has user_name and manager name.I want to get the user name for who have manager ='test'.I want to get the user who are having ramya as manager and reportee's reportee

users table 
SNO user_name   manager
1    vani        Ramya
2    ramya       geetha
3    priya       ramya
4    mani        ramya
5    latha       vani
6.   hema        Anitha 

I want to get the name ramya and ramya's reportee vani,priya and mani and get latha who is having vani as manager who is having ramya as manager. I want to get ramya,vani,priya,mani and latha



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire