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

select a.empname empname,b.empname mgrname from emp a,emp b
where a.mgrid=b.empid

Is This Answer Correct ?    20 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types pl/sql code blocks?

1137


What are the properties of a transaction?

1130


What are the rules to be applied to nulls whilst doing comparisons?

1324


What is over () in sql?

969


Is delete faster than truncate?

1003


How do I run a query in pl sql developer?

998


what is the difference between group by and order by in sql? : Sql dba

1131


What is java sql package?

1099


Is primary key clustered index?

952


What is oracle sql developer?

1062


What is the basic structure of an sql?

1104


What is sql server and ase?

1029


How do I install microsoft sql?

1056


What is function and procedure in pl sql?

1049


how to get a list of indexes of an existing table? : Sql dba

960