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

select e1.ename EmpName,e2.ename MgrName from emp e1,emp e2
where e1.mgr_id=e2.ename;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will you get by the cursor attribute sql%rowcount?

1017


How many parts of a pl sql block are optional?

1098


What is a natural join sql?

951


what is the difference between where clause and having clause? : Sql dba

980


What is a sql*loader control file?

1229


What is relationship? How many types of relationship are there?

1148


What is a table?

999


Does mysql_real_escape_string prevent sql injection?

934


Explain the purpose of %type and %rowtype data types with the example?

973


What are pl sql data types?

993


Is sql a microsoft product?

934


what is column? : Sql dba

988


What is sql server and ase?

1006


What is oracle sql developer?

1029


What is rollback?

1093