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

Which column of the user triggers data dictionary view displays the database event that will fire the trigger?

1030


what is the difference between delete and truncate commands? : Sql dba

1072


What is parameter substitution in sql?

1035


What is the difference between having and a where in sql?

1112


Is sql open source?

979


what is table? : Sql dba

1069


What is the difference between null value, zero, and blank space?

1209


How do I find duplicates in a single column in sql?

1025


what is an index? : Sql dba

1003


What is the purpose of design view?

1010


What is db journal file?

1072


What is numeric function sql?

1069


Is clustered index a primary key?

952


Can we update views in sql?

942


Can we create view in stored procedure?

981