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 is null in pl/sql?
What is aggregate function in sql?
what is myisam? : Sql dba
How to handle bulk data?
How to remove duplicate rows from a table?.
1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM atable a, atable b, ctable c, dtable d 3 ? 4 ORDER BY 1 What is the minimum number of joins that must be specified on line 3 in the sample code above to properly link the tables? Notice that the table "atable" is aliased twice: once as "a" and once as "b." 1. One join 2. Two joins 3. Three joins 4. Four joins 5. Five joins
How do you break a loop in pl sql?
What is difference between TRUNCATE & DELETE?
16 Answers Ahn Infotech, CitiGroup, ICICI, PreVator, Saama Tech, SkyTech, TCS,
What is assignment operator in pl sql?
wirte a query to filter improper date format follwing table? date 20-apr 22-may-2010 26-jun-2010 feb-2009 i want the output date 22-may-2010 26-jun-2010
Does oracle roll back the transaction on an error?
How do I start pl sql?
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)