| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Extracting Parent Model from Nested Sets Model
As i had seen an outer join as the only suggestion out there i
wondered if there weren´t a faster query for tables with a lot of
nested sets.
This is for mysql, but seems to be translatable to other dbs(?):
SELECT @next_brother:=33; //<- left + 1 for a specific parent
SELECT @next_brother:=
CASE WHEN left >= @next_brother
THEN right+1
ELSE @next_brother
Nuncanada Received on Mon Jan 20 2003 - 23:04:48 CST
![]() |
![]() |