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

I think this one will work
Select a.ename as Employee ,b.ename as Manager from
EMP ,EMP B
where
A.MGR_ID=B.empno

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define a temp table?

553


Which join is like inner join?

561


explain the difference between myisam static and myisam dynamic. : Sql dba

517


How does a covering index work?

529


List and explain the different types of join clauses supported in ansi-standard sql?

816






What is break?

619


What is bulk collect in pl sql?

532


what is the difference between char_length and length? : Sql dba

573


Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?

670


What is nvarchar in sql?

522


What has stored procedures in sql?

597


What is mutating sql table?

610


What pl/sql package consists of?

636


What are the most important characteristics of pl/sql?

576


How to add, remove, modify users using sql?

560