Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


pls explain connect by prior with example and its real time
use

Answers were Sorted based on User's Feedback



pls explain connect by prior with example and its real time use..

Answer / anil kumar karasi

sql>Select rownum,rownid,level,empno,ename from emp
connect by prior empno=mgr where mgr is null;

o/p
Rownum Rowid Level empno ename
------ ----- ----- ----- -----
1 AABBBCCDA 1 5678 abcd
2 AABBBCCDB 1 9087 poiu
3 AABBBCCDC 2 8567 QWER
4 AABBBCCDD 2 7321 LKJH
5 AABBBCCDE 3 1284 ZXCV

For more details go through this link
http://www.psoug.org/reference/connectby.html

Is This Answer Correct ?    10 Yes 1 No

pls explain connect by prior with example and its real time use..

Answer / muhammed zaheer

Connect by prior can be used to create heirarchical tree
structure

Is This Answer Correct ?    6 Yes 3 No

pls explain connect by prior with example and its real time use..

Answer / simi

CONNECT BY PRIOR is used for tree-structured queries.
I found a simple & useful explanation here:
http://www.oraclepassport.com
SQL - CONNECT By PRIOR Section

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More Oracle General Interview Questions

How to do a full database export?

0 Answers  


 How to use an oracle sequence generator in a mapping?

0 Answers   Informatica,


What is a deadlock in SQL? How can you prevent it?

1 Answers  


How to use fetch statement in a loop?

0 Answers  


Explain self joins in oracle?

0 Answers  


What are the Limitations of a CHECK Constraint ?

5 Answers  


what is unique key?

14 Answers   Amazon, Cap Gemini, Infosys, Wipro,


Please help me how to write a Query to change the primary key constraint from 1 attribute to another attribute in a table

3 Answers  


What types of joins are used in writing subqueries?

0 Answers  


How can you use check constraints for self referential integrity?

0 Answers  


What is the relation of a user account and a schema?

0 Answers  


what is the exact definition for pointer?

7 Answers   Wipro,


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)