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 / gunturajesh
select a.empname empname,b.empname mgrname from emp a,emp b
where a.mgrid=b.empid
Is This Answer Correct ? | 20 Yes | 2 No |
Post New Answer View All Answers
What is sql and db2?
What is the difference between a subquery and a join?
what is a materialized view? : Sql dba
What is auto increment feature in sql?
Explain the the delete statements in sql?
What is pl sql package?
What is data abstraction in sql?
Can we update views in sql?
What is the difference between function, procedure and package in pl/sql?
What are sql injection vulnerabilities?
What is a delimiter in sas?
What are the different tcl commands in sql?
What is the difference between sql and isql*plus?
Can you join views in sql?
Do we need to create index on primary key?