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 / praveen h

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 ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I run a query in pl sql developer?

1008


what are the types of join and explain each? : Sql dba

1048


What are user defined functions?

1026


How do I view stored procedures?

981


How do you create a db file?

1023


What is audit logout in sql profiler?

1036


What is the difference between sum and count in sql?

996


What is difference between my sql and sql?

1084


What are keys in sql?

1007


What is difference between rank () row_number () and dense_rank () in sql?

1119


How do I create a sql database?

1011


Can delete statement be rollbacked?

995


define sql update statement ? : Sql dba

1128


What is primary key secondary key alternate key candidate key?

1041


What is group by in sql?

1093