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 is clustered index in sql?
What is the maximum database size for sql express?
How would you pass hints to the sql processor?
How to check if a column is nullable before setting to nullable?
Can a commit statement be executed as part of a trigger?
Is foreign key mandatory?
What do you mean by stored procedures?
How to read xml file in oracle pl sql?
Name the operator which is used in the query for pattern matching?
what are numeric data types? : Sql dba
Is natural join same as inner join?
What are types of exception?
How do I remove sql developer from windows 10?
What are schema-level triggers?
Why do we use partitions in sql?