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
what is the difference between a web-garden and a web-farm? : Sql dba
What is the difference between clustered and non-clustered index in sql?
what is the difference between delete and truncate commands? : Sql dba
How do I write a sql query in pgadmin 4?
What is the difference between a primary key and a unique key?
Can we use pl sql in mysql?
what are the advantages of mysql in comparison to oracle? : Sql dba
How to use distinct and count in sql query? Explain
How to disable a trigger name update_salary?
what are null values? : Sql dba
What is a schema? How is it useful in sql servers?
What is a sql trace file?
Can a foreign key have a different name?
Why triggers are used?
How does sql store data?