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 Anti joins
using cursors salesman get bonus as 10% of their salary , managers get 20% , analalist get 30%. generae a report showing the employee name, salary , bonus.
What is sql mysql pl sql oracle?
Is ms sql traffic encrypted?
Is vs as in pl sql?
Can you alter start with clause?
What are the default Oracle triggers??
how to dump a table to a file with 'mysqldump'? : Sql dba
What is the difference between SQL and PLSQL
how can we replace the particular column value of a resulted set of executed query? I mean write down a sql query to chane the particular column's value of a resulted set of executed query
Why is pl sql needed?
What is error ora-01000: maximum open cursors exceeded
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)