Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

(click on this box to dismiss)

CUBRID Hierarchical Queries

Suppose you have table representing a tree in the database. Something like:

Id, ParentId, Name

Is it possible to write a query in CUBRID to retrieve all the direct and indirect ancestors/predecessors of the specified tree node?

link comment (0) accepted answer
asked 6 years ago
71 Answers

Standard SQL supports this already by using recursive common table expressions (CTEs). CUBRID supports CTEs by default. You may want to check out this link for reference:

Additionally there is a great tutorial on Hierarchical Queries in CUBRID (PDF).

link comment (0)
answered 6 years ago

You are either using a very old browser or a browser that is not supported.
In order to browse you need to have one of the following browsers:

Internet Explorer: Mozilla Firefox: Google Chrome: