| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Is this possible w/o a stored procedure?
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
![]() |
![]() |