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 / sudhan
select e1.ename EmpName,e2.ename MgrName from emp e1,emp e2
where e1.mgr_id=e2.ename;
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What will you get by the cursor attribute sql%rowcount?
How many parts of a pl sql block are optional?
What is a natural join sql?
what is the difference between where clause and having clause? : Sql dba
What is a sql*loader control file?
What is relationship? How many types of relationship are there?
What is a table?
Does mysql_real_escape_string prevent sql injection?
Explain the purpose of %type and %rowtype data types with the example?
What are pl sql data types?
Is sql a microsoft product?
what is column? : Sql dba
What is sql server and ase?
What is oracle sql developer?
What is rollback?