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 / adil

I think this one will work
Select a.ename as Employee ,b.ename as Manager from
EMP ,EMP B
where
A.MGR_ID=B.empno

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two types of exceptions.

1181


Can we create a trigger on view?

905


what is a composite key ? : Sql dba

1072


Which are the different character-manipulation functions in sql?

1077


What is sorting in sql?

956


Can 2 queries be executed simultaneously in a distributed database system?

1156


What is clause in sql?

1122


What does rownum mean in sql?

1039


What is blind sql injection?

1082


Does oracle roll back the transaction on an error?

1027


Why we use stored procedure instead of query?

1010


what is a record in a database ? : Sql dba

1071


How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?

1119


What are the indexing methods?

1059


What is sql in java?

1096