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
Define a temp table?
Which join is like inner join?
explain the difference between myisam static and myisam dynamic. : Sql dba
How does a covering index work?
List and explain the different types of join clauses supported in ansi-standard sql?
What is break?
What is bulk collect in pl sql?
what is the difference between char_length and length? : Sql dba
Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?
What is nvarchar in sql?
What has stored procedures in sql?
What is mutating sql table?
What pl/sql package consists of?
What are the most important characteristics of pl/sql?
How to add, remove, modify users using sql?