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
1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...
Explain what is a subquery ?
What is cross join example?
what is a join? : Sql dba
What is procedure explain with program?
How to install oracle sql developer?
how to use myisamchk to check or repair myisam tables? : Sql dba
How to run pl/sql statements in sql*plus?
what is sp_pkeys? : Transact sql
What is the default isolation level in sql server? : Transact sql
Explain the update statement in sql
How many clustered indexes can you have?
What is coalesce sql?
Is it possible to create the following trigger: before or after update trigger for each row?
What are triggers and its types?