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 / rajesh venati

select e.ename as employee_name,m.ename as manager_name from
emp e, emp m where e.mgr_id=m.empno;

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java sql connection?

1001


What is dba in sql? : SQL DBA

1009


Difference between global and parameter variables?

1927


What is a left join?

904


What is a rank in sql?

921


How do I create a sql database?

961


What is a sql schema used for?

1060


Give the order of sql select?

1107


How do sql databases work?

967


How does one load ebcdic data? : aql loader

1126


What is pl sql record in oracle?

989


What is not equal in sql?

1056


How do you create an update query?

932


What is sql not null constraint?

996


What is string join?

956