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
What is sql query limit?
How can we find duplicate records in a table?
Can we use view in stored procedure?
What are the advantages of indexing?
Is it possible to update views?
What is query optimization in sql?
Which function is used to return remainder in a division operator in sql?
What is cursor in pl sql with examples?
What is group function in sql?
Explain exception handling in pl/sql?
Is pl sql still used?
Can we commit in trigger?
what are all different types of collation sensitivity? : Sql dba
What is a sql instance vs database?
How do I count rows in sql query?