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...

Hi all,
i have a table as follows
empid empname mgrid deptid
1 a 3 4
2 b 1 5
3 c 2 3
4 d 3 6
5 e 4 7

i want the output as
empname mgrname
a c
b a
c b
d c
e d

Answer Posted / nanne saheb c

select e.empname,m.ename mgrname from emp e,emp m
where e.mgrid=m.empid;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the the update statement in sql?

1015


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

1110


Why do we need unique key in a table?

942


What is a sql driver?

985


what is sql? : Sql dba

1002


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

997


What is pl/sql language case sensitive?

1105


What are the various levels of constraints?

1114


How to read/write files from pl/sql?

1023


What are dml commands?

1002


What is row_number () in sql?

964


explain about mysql and its features. : Sql dba

1002


What is trigger point?

977


What is nvarchar in sql?

916


What are the possible values that can be stored in a boolean data field?

984