SECTION_NEIGHBORS
Columns
Name | Type | Nullable | Insertable | Updatable | Deletable | Comment |
---|
SECTION_ID | NUMBER(38) | N | YES | YES | YES | |
PREV_SECTION_ID | NUMBER(38) | Y | NO | NO | NO | |
NEXT_SECTION_ID | NUMBER(38) | Y | NO | NO | NO | |
Query:
select s0.section_id,
(select s1.section_id
from manual_sections s1
where s0.manual_id = s1.manual_id
and s1.sort_key = (select max(s2.sort_key)
from manual_sections s2
where s0.manual_id = s2.manual_id
and s0.sort_key > s2.sort_key
and s2.active_p = 't'
and s2.content_p = 't')) as prev_section_id,
(select s1.section_id
from manual_sections s1
where s0.manual_id = s1.manual_id
and s1.sort_key = (select min(s2.sort_key)
from manual_sections s2
where s0.manual_id = s2.manual_id
and s0.sort_key < s2.sort_key
and s2.active_p = 't'
and s2.content_p = 't')) as next_section_id
from manual_sections s0
Generated by OraSchemaDoc,
(c) Aram Kananov, 2002