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 many scalar data types are supported in pl/sql?
What is AUTH_ID and AUTH_USER in pl/sql ?
What is left join in postgresql?
What do we need to check in database testing?
Why do we use joins?
What is sql select statement?
How many types of normalization are there?
Explain autonomous transaction.
What are all types of user defined functions?
How do I remove sql developer from windows 10?
Can a foreign key have a different name?
Can we use commit inside a trigger?
Why should I use postgresql?
How delete all data from all tables in sql?
Which is better varchar or nvarchar?