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 / monika
select empno,ename
from emp
start with mgr_id is null
connect by prior empno=mgr_id;
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
mention if it is possible to import data directly from t-sql commands without using sql server integration services? If yes, what are the commands? : Transact sql
How many joins can you have in sql?
How to return an array from java to pl/sql?
Can you upgrade sql express to full sql?
How do I view a table in sql?
What is blind sql injection?
how to extract a unit value from a date and time? : Sql dba
What is the use of function in sql?
Which join is like inner join?
Which is better join or inner query?
what is the difference between a local and a global temporary table? : Sql dba
What are sql functions? Describe in brief different types of sql functions?
Explain dml and ddl?
What is full form of rtm?
What is an intersect?