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 are the two types of exceptions.
Can we create a trigger on view?
what is a composite key ? : Sql dba
Which are the different character-manipulation functions in sql?
What is sorting in sql?
Can 2 queries be executed simultaneously in a distributed database system?
What is clause in sql?
What does rownum mean in sql?
What is blind sql injection?
Does oracle roll back the transaction on an error?
Why we use stored procedure instead of query?
what is a record in a database ? : Sql dba
How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?
What are the indexing methods?
What is sql in java?