Re: Is this possible w/o a stored procedure?

From: The Big Cheese <big-cheese_at_cyber-wizard.com>
Date: 2000/06/19
Message-ID: <11asksgqpnt44eas3dbvn6rj1171c0h6jr_at_4ax.com>#1/1


No, it is not possible. Some vendors (oracle, for example) have extensions to SQL that allow recursive queries and I think the proposed SQL3 standard may have recursive queries.

nkaiser_at_my-deja.com wrote:

>I'm using mySQL, so stored procedures are not possible.
>I have a simple table:
>
>ID int
>PARENT_ID int
>DESC varchar(10)
>
>So, a top level category would just have an ID and no PARENT_ID. There
>is no limit on how deep the recursion can go.
>
>I want to have a query which will get all IDs under a certain PARENT_ID.
>
>So, let's say we have: DESC (ID)
>BOOKS (10)
>(parent of)
>TECH BOOKS (95)
>(parent of)
>JAVA BOOKS (134)
>
>Now, I want a query that will recursively get all categories under 10
>(BOOKS). Is that possible without a stored procedure?
>
>Thanks!
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Mon Jun 19 2000 - 00:00:00 CEST

Original text of this message