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 sp_pkeys? : Transact sql
A table has 150 records. How do you retrieve 100th row to 120th row from that table ?
Can we use join in subquery?
diff b/w function and procedure?
What is parameter substitution in sql?
What are the set operators in sql?
Explain aggregate functions are available there in sql?
How to display the records between two range in Oracle SQL Plus?
Write a query to find the employees from EMP table those who have joined in Monday. (there is a column as hiredate which is a date column i.e values are like 03-DEC-81)
Is left join and outer join same?
SELECT category, type, AVG(price) FROM products GROUP BY category, type ORDER BY 1, 2 If there are three distinct categories in the "products" table, and each one has five different types, how many rows are returned by the query above? 1. 1 row 2. 3 rows 3. 5 rows 4. 8 rows 5. 15 rows
What is out parameter used for eventhough return statement can also be used in 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)