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 / praveen h
I think this one will work
Select a.ename as Employee ,b.ename as Manager from
EMP ,EMP B
where
A.MGR_ID=B.empno
Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
What is form and report?
What is synonyms?
how to get @@error and @@rowcount at the same time? : Sql dba
how to convert character strings to numeric values? : Sql dba
What is output spooling in sql*plus?
Does sql require a server?
What is the difference between truncate and drop statements?
What are data types in pl sql?
Can we rollback truncate?
List the various privileges that a user can grant to another user?
what is sql server agent? : Sql dba
How can we connect an Android App to an Oracle database and use the PL/SQL procedural code?
Can sql developer connect to db2?
What is sequence in sql?
hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews