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


Please Help Members By Posting Answers For Below Questions

What is union and union all keyword in sql?

565


What is a procedure in pl sql?

543


Why we use join in sql?

529


What are predefined functions in sql?

531


explain primary keys and auto increment fields in mysql : sql dba

522






Is natural join same as inner join?

505


What are the two types of cursors in pl sql?

535


Are sql connections encrypted?

556


What are three advantages to using sql?

549


What is the order of sql select?

572


How do I install sql?

517


How do I create a sql database?

521


What is the use of partition by in sql?

514


how to use like conditions? : Sql dba

573


What is the purpose of my sql?

506