Explain Connect by Prior?

Answers were Sorted based on User's Feedback



Explain Connect by Prior?..

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

Explain Connect by Prior?..

Answer / guest

Retrives rows in hierarchical order.
e.g. select empno, ename from emp where

Is This Answer Correct ?    6 Yes 16 No

Post New Answer

More SQL PLSQL Interview Questions

will function return more than one value how

9 Answers   Accenture,


1.when will you use week refcursor and when will you use strong ref cursor ? 2.what is the use of sql trace..how do you use it ? 3.can you please send all the sql plus commands...like set line 6000....

1 Answers   Satyam,


what are date and time data types in mysql? : Sql dba

0 Answers  


can i give user defined exception in a package

2 Answers  


What is the difference between DELETE and TRUNCATE?

15 Answers   Johns Hopkins University, Tech Mahindra,






Explain how to use transactions efficiently : transact sql

0 Answers  


Which normal form is best?

0 Answers  


how many values can the set function of mysql take? : Sql dba

0 Answers  


what is the difference between truncate and delete statement? : Transact sql

0 Answers  


What do you understand by pl/sql packages?

0 Answers  


Can ddl statements be used in pl/sql?

0 Answers  


How is indexing done in search engines?

0 Answers  


Categories