Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Is this possible w/o a stored procedure?

Is this possible w/o a stored procedure?

From: <nkaiser_at_my-deja.com>
Date: 2000/06/18
Message-ID: <8ihemv$9bb$1@nnrp1.deja.com>#1/1

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 Sun Jun 18 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US