A table was given with 3 columns like Manager id,Manager
Name and Employee name.
Question was to create hierarchy.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
what are aggregate and scalar functions? : Sql dba
Suppose a student column has two columns, name and marks. How to get name and marks of the top three students.
Why does %isopen return false for an implicit cursor?
what is a record in a database ? : Sql dba
define different types of trigger. : Sql dba
Write the order of precedence for validation of a column in a table? I. Done using database triggers. Ii. Done using integarity constraints
How do I save the results of sql query in a file?
What are all ddl commands?
what is the difference between group by and order by in sql? : Sql dba
What is sqlca in db2?
What is the maximum number of triggers, you can apply on a single table?
What is embedded sql with example?