Open Source RDBMS - Seamless, Scalable, Stable and Free

English | 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?

링크 댓글 쓰기 (0) 선택된 답변
질문시간 3년 전
71 답변들

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).

링크 댓글 쓰기 (0)
답변시간 3년 전

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: