Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to list all childs elements
Philip Greenspun has a very resource for learning about these types of
hierarchical queries.
The URL is http://philip.greenspun.com/sql/trees.html
The site even includes code for your specific requirement.
Regards
Mike
TESSELLA Michael.OShea_at_tessella.com
__/__/__/ Tessella Support Services plc __/__/__/ 3 Vineyard Chambers, ABINGDON, OX14 3PX, England __/__/__/ Tel: (44)(0)1235-555511 Fax: (44)(0)1235-553301www.tessella.com Registered in England No. 1466429
tomec_at_obywatel.pl wrote:
> Hello,
>
> I have a table with 3 fields (name,id,child_id) where id is parent id
> and child_id is its child id.
> For example:
>
>
> name id child_id
> mary 1 12
> henry 12 3
> john 5 4
> andrew 3 17
>
>
> How to list all childs of mary (12,3,17 ) using sql/ pl/sql?
>
> Thanks in advance
> Best Regards
> AGent
Received on Wed Jan 03 2007 - 05:39:30 CST