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

Can you have a foreign key without a primary key?

510


What are inner and outer joins examples of both?

497


Write a sql query to convert all character to uppercase after hypen.

960


What is your daily office routine?

1810


What are the different types of triggers?

593






How do you select unique values in sql?

501


Why do we use function in pl sql?

558


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

1561


How do you explain an index number?

535


What are the types of join in sql?

520


what is the difference between blob and text? : Sql dba

529


What are the various levels of constraints?

666


How much does sqlite cost?

558


What is the difference between jpql and sql?

555


What is embedded sql in db2?

507