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...

i have a table emp and columns ename,empno,mgr_id,i need ename,manager name as result i.e employee respective manager.. example
empno ename mgr_id
1 john 3
2 paul 3
3 smith 1
4 kevin 1
5 stewart 2

result has to look like this

ename manager
john smith
paul smith
smith john
kevin john
stewart paul


can u plz help me out in this.....

Answer Posted / cbigmudre

select a.ename, b.enanme as manager
from emp as a, emp as b
where a.empno = b.mgr_id

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are keys in sql?

1041


What is difference between db2 and sql?

1046


Can we create clustered index without primary key?

1001


what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

1117


What is pl sql in oracle?

1099


What are the parts of a sql statement?

1144


What is a record in a database?

1102


What is data manipulation language?

1233


When is the explicit cursor used ?

1090


How do you create a unique index?

1093


What do you mean by table in sql?

1045


What are the different sql commands?

1127


How can I tell if sql is running?

1133


How do I view a sql trace file?

1063


How to get each name only once from an employee table?

1160