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 is union and union all keyword in sql?
What is a procedure in pl sql?
Why we use join in sql?
What are predefined functions in sql?
explain primary keys and auto increment fields in mysql : sql dba
Is natural join same as inner join?
What are the two types of cursors in pl sql?
Are sql connections encrypted?
What are three advantages to using sql?
What is the order of sql select?
How do I install sql?
How do I create a sql database?
What is the use of partition by in sql?
how to use like conditions? : Sql dba
What is the purpose of my sql?