Hi all,
i have a table as follows
empid empname mgrid deptid
1 a 3 4
2 b 1 5
3 c 2 3
4 d 3 6
5 e 4 7

i want the output as
empname mgrname
a c
b a
c b
d c
e d

Answer Posted / nanne saheb c

select e.empname,m.ename mgrname from emp e,emp m
where e.mgrid=m.empid;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between 'between' & 'and' operators in sql

531


What trigger means?

568


What is a pragma statement?

723


How do you bind variables in pl sql?

584


How can get second highest salary in sql?

509






How to change sql*plus system settings?

545


Is pl sql still used?

511


What is trigger and stored procedure in sql?

560


Why sql query is slow?

583


What is the difference between explicit and implicit cursors in oracle?

518


what is collation? : Sql dba

620


What is the use of triggers?

545


What is a data definition language?

560


What are the types of index in sql?

537


What is a procedure in pl sql?

553