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

Answer Posted / sankar

select manager name,employee name,level from table_name
start with manager_name is null/* optional */ connect by prior
no cycle employee name=manager name/*child=parent*/

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does an inner join do?

565


What are sql indexes?

555


How many columns should be in an index?

532


What is a sql*loader control file?

626


What is sorting in sql?

511






Can we insert delete data in view?

560


Can we use rowid as primary key?

554


What is normalization in sql?

533


What is nested table in pl sql?

561


How do I find sql profiler?

530


What is the difference between cluster and non-cluster index?

630


What is the current version of sql?

548


What are sql commands?

511


What does varchar include?

529


What is a procedure in pl sql?

561