-
Can any body tell me is there any support in Oracle
For getting the result in nested way
Something Like
Select con.Name , (Select state.name from state where state.country = con.name ) from Country con
And Returns the result in following Format
USA
[California
Washington]
India
[DeLhi
Maharashta
Haryana ]
ie result in TREE Format
That is single Occurence of USA , India
NOT LIKE
USA California
USA Washington
India DeLhi
India Maharashta
India Haryana
There is support for this thing Using Break But i Want if it is possible to take the resultSet in that way ( ie Java ResultSet)
-
Hi,
you can user the connect by prior clause
try this query on the emp table:
select
lpad(' ',2*(level-1))|| ename ,
e.empno, e.mgr, e.job, e.deptno
from emp e
connect by prior empno = mgr
start with mgr is null
cheers,
R.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|