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
How to fetch values from testtable1 that are not in testtable2 without using not keyword?
Are sql connections encrypted?
Write the command to remove all players named sachin from the players table.
Which function is used to return remainder in a division operator in sql?
What does fetching a cursor do?
Can a select statement fire a trigger?
Is null operator in sql?
What is restrict in sql?
What does varchar include?
what is the different between now() and current_date()? : Sql dba
What is sql partition?
Define overloaded procedure?
Can we call procedure in select statement?
What is natural join in sql?
what is recursive stored procedure? : Sql dba