i have a table emp and columns ename,empno,mgr_id,i need ename,manager name as result i.e employee respective manager.. example
empno ename mgr_id
1 john 3
2 paul 3
3 smith 1
4 kevin 1
5 stewart 2
result has to look like this
ename manager
john smith
paul smith
smith john
kevin john
stewart paul
can u plz help me out in this.....
Answer Posted / rajesh venati
select e.ename as employee_name,m.ename as manager_name from
emp e, emp m where e.mgr_id=m.empno;
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
Is clustered index a primary key?
State some properties of relational databases?
how do you know if your mysql server is alive? : Sql dba
what is the difference between truncate and delete statement? : Transact sql
how to analyze tables with 'mysqlcheck'? : Sql dba
What are secondary keys?
What is restrict in sql?
What is dense_rank?
How do I order by ascending in sql?
What pl/sql package consists of?
what are all types of user defined functions? : Sql dba
What are the parameter modes supported by pl/sql?
What view means?
Can one improve the performance of sql*loader? : aql loader
Explain how exception handling is done in advance pl/sql?