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 the ddl commands?
What is the Difference between Procedure and Function.Can we call a Function in a DML?
What is the best partition size for windows 10?
how to create temparary sequence
Is sql developer case sensitive?
What is an Exception ? What are types of Exception ?
How many sql statements are used?
How One can easily select all even, odd, or Nth rows from a table using SQL queries?
What is the difference between drop and truncate commands?
What is cursor status?
how can we destroy the cookie? : Sql dba
what is commit? : Sql dba
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)