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
What is sql dialect?
What are hotfixes and patches?
How do you update f as m and m as f from the below table testtable?
How do you update a sql procedure?
What is a design view?
how to rename an existing table in mysql? : Sql dba
explain the difference between bool, tinyint and bit. : Sql dba
What is offset in sql query?
Why are aggregate functions called so?
Explain the difference between sql and mysql.
Is nosql faster than sql?
What are the indexing methods?
Why do we use sql constraints? Which constraints we can use while creating database in sql?
What are string functions in sql?
How do you drop a trigger?