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
How do I run a query in pl sql developer?
what are the types of join and explain each? : Sql dba
What are user defined functions?
How do I view stored procedures?
How do you create a db file?
What is audit logout in sql profiler?
What is the difference between sum and count in sql?
What is difference between my sql and sql?
What are keys in sql?
What is difference between rank () row_number () and dense_rank () in sql?
How do I create a sql database?
Can delete statement be rollbacked?
define sql update statement ? : Sql dba
What is primary key secondary key alternate key candidate key?
What is group by in sql?