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
Is oracel sql developer written in java?
Does varchar need length?
How to get unique records from a table?
what is 'trigger' in sql? : Sql dba
Is id a reserved word in sql?
Does mysql_real_escape_string prevent sql injection?
What is #table in sql?
Is there any restriction on the use of union in embedded sql?
What are character functions?
What is mutating error?
Is sql microsoft?
Cite the differences between execution of triggers and stored procedures?
How do I run a script in sql developer?
How to run sql statements through the web interface?
how to present a past time in hours, minutes and seconds? : Sql dba