A table was given with 3 columns like Manager id,Manager
Name and Employee name.
Question was to create hierarchy.

Answer Posted / sharad kumar

select manager name,employee name,level
from table_name
start with manager name is null /* optional*/
connect by prior nocycle employee name = manager name
/*Child = Parent */

Is This Answer Correct ?    20 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain table and field in sql?

782


What is sequence in sql?

720


What is rownum and rowid?

761


What is sql in java?

757


What is the difference between left join and right join?

670






what are date and time functions in mysql? : Sql dba

718


What is the use of function in sql?

732


What is left join in sql?

753


How does a self join work?

693


How do sql triggers work?

748


What are the disadvantages of file system?

829


What is the basic structure of an sql?

758


Which is faster view or stored procedure?

690


What is lexical units in pl sql?

761


How can you view the errors encountered in a trigger?

735