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
What is a natural join?
What is the difference between sql and mysql?
What is a unique constraint?
What is difference between stored procedure and trigger?
What are primary key and foreign key and how they work?
what is a relationship and what are they? : Sql dba
write an sql query to find names of employee start with 'a'? : Sql dba
Can we have two clustered index on a table?
How to execute a stored procedure?
What is sql rowcount?
how to create a new table in mysql? : Sql dba
how do you know the version of your mysql server? : Sql dba
how to dump a table to a file with 'mysqldump'? : Sql dba
How to connect a sql*plus session to an oracle server?
what is an index? : Sql dba