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
Define implicit and explicit cursors.
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
What is out parameter used for eventhough return statement can also be used in pl/sql?
Why do we use function in pl sql?
Why truncate is faster than delete?
Write a program that shows the usage of while loop to calculate the average of user entered numbers and entry of more numbers are stopped by entering number 0?
What is Collation Sensitivity ? What are the various type ?
Explain constraints in sql?
Explain lock escalation? : Transact sql
how to present a past time in hours, minutes and seconds? : Sql dba
What is a field in a database?
Is mariadb a nosql database?
What is mutating error in pl sql?
what is sp_pkeys? : Transact sql
What is difference between stored procedures and application procedures?