Explain Connect by Prior?
Answers were Sorted based on User's Feedback
Answer / abhijit
The start with .. connect by clause can be used to select
data that has a hierarchical relationship (usually some sort
of parent->child (boss->employee or thing->parts).
select a.*, level from emp a
start with mgr is null
connect by mgr = prior empno;
The start with .. connect by clause can be used to select
data that has a hierarchical relationship (usually some sort
of parent->child (boss->employee or thing->parts).
| Is This Answer Correct ? | 19 Yes | 0 No |
Answer / guest
Retrives rows in hierarchical order.
e.g. select empno, ename from emp where
| Is This Answer Correct ? | 6 Yes | 16 No |
Which is better join or subquery?
How do you retrieve the second highest salary from a table?
What is cursor in pl sql with examples?
How to get help at the sql prompt?
What is meaning of <> in sql?
What is difference between cursor and ref cursor?
What are different types of statements supported by sql?
What is difference between sql and excel?
Table name: T1, it has only one column. col1 ------ c b a b b b b d s a a t s Requirement: I need the following output from the above base table by using SQL query. col1 Cnt ----- ------- a 3 b 5 Others 5 Please help. Thanks Guru v.gurus@in.com
Differences between UNIQUE and DISTINCT in select statements
26 Answers ABS, DELL, Deloitte, Hewitt, Oracle, Verinon Technology Solutions, Wipro,
How to select all records from the table?
What is sqlca in powerbuilder?
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)