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 find duplicates in two columns?

1131


What is the maximum size of sqlite database?

1090


Define SQL and state the differences between SQL and other conventional programming Languages?

1197


How run sql*plus commands that are stored in a local file?

1038


What is the most important ddl statements in sql are?

981


Can I copy :old and :new pseudo-records in/to an oracle stored procedure?

1195


Why do we need sharding?

977


What is sap sql anywhere?

1050


what is a composite key ? : Sql dba

1033


What is a record in pl/sql?

1126


What is the difference between numeric and autonumber?

980


What is the syntax and use of the coalesce function?

1143


Is it possible to read/write files to-and-from PL/SQL?

1084


What is compilation error in pl sql?

960


Which sql statement is used to return only different values?

986