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 are procedures used for?
What is example of database?
Does pl sql work in mysql?
What are functions in sql?
How do I run a query in pl sql developer?
What are sql commands?
what is the difference between char_length and length? : Sql dba
What is a full join?
explain the difference between delete , truncate and drop commands? : Sql dba
Explain how can you save or place your msg in a table?
How do I sort a table in sql?
how to select first 5 records from a table? : Sql dba
Which is better stored procedure or query?
What is the difference between inner join and natural join?
What is sql in oracle?