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
How to resolve name conflicts between variables and columns?
How many types of database triggers exist?
How to apply filtering criteria at group level in oracle?
Can we store images in oracle database?
When do I need to use a semicolon vs a slash in oracle sql?
Explain oracle data types with examples?
What are nested tables?
What is literal?
Briefly explain what is literal? Give an example where it can be used?
Can group functions be mixed with non-group selection fields?
What is bulk load in oracle?
What do you mean by merge in oracle?
Describe an oracle table?
Can we use oracle pl/sql block in core java? if so how? pls get back to me .....
what is the scripts in data base?