pls explain connect by prior with example and its real time
use
Answer Posted / 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 |
Post New Answer View All Answers
What is the quickest way to export a table to a flat file?
Explain about functional dependency and its relation with table design?
What is format trigger?
Is there a function to split a string in plsql?
What is a sub query and what are the different types of subqueries?
How to convert characters to times in oracle?
What is an anonymous block?
How to get last row id?
How to find out what oracle odbc drivers are installed?
How to run create database statement again?
How do I reset a sequence in oracle?
What is analyze command used for?
Will you be able to store pictures in the database?
What are the different types of failures that occur in Oracle database?
State all possible different index configurations a table can possibly have?