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 / rajesh venati
select e.ename as employee_name,m.ename as manager_name from
emp e, emp m where e.mgr_id=m.empno;
Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
Where are my tempfiles, I don't see them in v$datafile or dba_data_file?
Why is there a need for sqlcode and sqlerrm variables?
How subquery works in sql?
What is sql used for?
What is sql clause?
Why plvtab is considered as the easiest way to access the pl/sql table?
define sql insert statement ? : Sql dba
What is difference between sql and excel?
What is cross join example?
Write the command to remove all players named sachin from the players table.
What is constant in pl sql?
What is the difference between delete, truncate and drop command?
What is oracle and pl sql?
is mysql query is case sensitive? : Sql dba
What is int identity in sql?