| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Heirarchical Data Structures. MS Access. Together?
>> one should not allow removal of a parent (i.e. someone that has
children)... any parent has (right - left - 1) / 2 = number of
children. <<
I usually use (lft = rgt -1) to detect leaf nodes. If there is an index on (lft, rgt) or just (lft), the speed is pretty good.
DELETE FROM Tree
WHERE lft = rgt -1
AND <<other conditions>>;
Received on Mon Jul 28 2003 - 11:54:14 CDT
![]() |
![]() |