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

Is join an inner join?

718


explain the delete statements in sql

746


What is the difference between sql and mysql?

759


What can sql server reporting services do?

792


What does over partition by mean in sql?

708






what is the functionality of the function htmlentities? : Sql dba

692


Explain exception handling in pl/sql?

726


How to use distinct and count in sql query? Explain

765


What is the difference between pl and sql?

735


How to add a column ‘salary’ to a table employee_details?

770


How many clustered indexes can you have?

726


What is a unique key and primary key and foreign key?

742


How do I copy a table in sql?

695


What is auto increment?

733


What is crud diagram?

677