MySQL Forums
Forum List  »  Stored Procedures

Re: nested lookup - query to get the respective child(s)
Posted by: Peter Brawley
Date: September 16, 2012 10:00AM

Manhao,

Your area_lookup table implements an edge list model of a tree. Unless you specify in advance a maximum tree depth, querying such a tree is recursive, which in MySQL requjires a storedprocedure. See Listings 7 through 7d in http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html for examples of such sprocs.

PB

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: nested lookup - query to get the respective child(s)
1220
September 16, 2012 10:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.