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
How do I find duplicates in two columns?
What is the maximum size of sqlite database?
Define SQL and state the differences between SQL and other conventional programming Languages?
How run sql*plus commands that are stored in a local file?
What is the most important ddl statements in sql are?
Can I copy :old and :new pseudo-records in/to an oracle stored procedure?
Why do we need sharding?
What is sap sql anywhere?
what is a composite key ? : Sql dba
What is a record in pl/sql?
What is the difference between numeric and autonumber?
What is the syntax and use of the coalesce function?
Is it possible to read/write files to-and-from PL/SQL?
What is compilation error in pl sql?
Which sql statement is used to return only different values?