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 many scalar data types are supported in pl/sql?

1106


What is AUTH_ID and AUTH_USER in pl/sql ?

2237


What is left join in postgresql?

1092


What do we need to check in database testing?

1069


Why do we use joins?

1102


What is sql select statement?

1089


How many types of normalization are there?

1018


Explain autonomous transaction.

1223


What are all types of user defined functions?

1140


How do I remove sql developer from windows 10?

1185


Can a foreign key have a different name?

1001


Can we use commit inside a trigger?

1147


Why should I use postgresql?

1070


How delete all data from all tables in sql?

987


Which is better varchar or nvarchar?

1053