Trees in SQL (again)

Поиск
Список
Период
Сортировка
От Bartek Teodorczyk
Тема Trees in SQL (again)
Дата
Msg-id 36DD4E78.9BC36320@it.pl
обсуждение исходный текст
Ответы Re: [SQL] Trees in SQL (again)  (jwieck@debis.com (Jan Wieck))
Список pgsql-sql
I'm trying to implement set model of trees in SQL and I found a problem:

How to find first level children of parent?

For this structure (with left and right set values):

          1 Jerry 10
              |
     -------------------
     |                 |
 2 Bert 3          4 Chuck 9
                       |
                 ------------
                 |          |
             5 Donna 6  7 Fred 8

The question is: Who is first level child of Jerry?
The answer should produce:
        Bert
        Chuck

BarTeo

В списке pgsql-sql по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Undeliverable Message
Следующее
От: jwieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [SQL] Trees in SQL (again)