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 are the differences between in and exists clause?

571


How to look at the current sql*plus system settings?

606


What is cursor explain with example?

555


what are the types of join and explain each? : Sql dba

532


what are different types of keys in sql?

607






What is trigger in sql?

582


What is latest version of sql?

527


Can we rollback delete command?

514


how to use like conditions? : Sql dba

575


What is native sql query?

552


What are user defined functions?

579


Is null operator in sql?

606


What trigger means?

567


Difference between global and parameter variables?

1458


what is index? : Sql dba

558