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 / praveen h
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 ? | 9 Yes | 2 No |
Post New Answer View All Answers
What is the difference between truncate and drop statements?
What is autocommit sql?
Explain how can you save or place your msg in a table?
How do I partition a table in sql?
How do I upgrade sql?
Can you inner join the same table?
Does truncate free space?
what happens if null values are involved in expressions? : Sql dba
Does truncate table reset auto increment?
How can I delete duplicate rows?
What is a memo field?
How can I make sql query run faster?
How can you get sql*loader to commit only at the end of the load file? : aql loader
What is sql query limit?
Can we use insert statement in function?