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
Why use subqueries instead of joins?
Is left join inner or outer?
How do I restart sql?
Mention what is the plv (pl/vision) package offers?
What's the difference between inner join and left join?
Why are indexes and views important to an organization?
how to include character strings in sql statements? : Sql dba
What is cursor in pl sql?
what is the difference between char_length and length? : Sql dba
How can you create an empty table from an existing table?
how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba
Cite the differences between execution of triggers and stored procedures?
What are the parts of a sql statement?
difference between anonymous blocks and sub-programs.
What is an index? What are the types of indexes? How many clustered indexes can be created on a table?