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

What is acid property in a database?

1087


How do I run a query in pl sql developer?

1053


What is interval partition?

1104


How does postgresql compare to "nosql"?

1086


What is the difference between having clause and where clause?

1116


How can you create an empty table from an existing table?

1129


What is the maximum database size for sql express?

1073


How long does it take to learn pl sql?

1107


How is data stored in sql?

1103


how can you see all indexes defined for a table? : Sql dba

1053


How to write a query to show the details of a student from students table whose

1063


What is the order of sql select?

1088


how do you know if your mysql server is alive? : Sql dba

1130


Why do we create stored procedures & functions in pl/sql and how are they different?

995


What are the features of pl sql?

1112