Subject Re: Deleting hierarchical data by using recursive CTE
Author ma_golyo
Hi!

Use foreign key with CASCADE delete rule.

--- In firebird-support@yahoogroups.com, Nols Smit <nols@...> wrote:
>
> Hi,
>
> I'm using FireBird 2.5
> I have a table with hierarchical data.
> A column "Parent_Id" that holds the Id ("ID" - the primary key column) of it's parent.
>
> When deleting a row, I want to delete, using recursive CTE, all children (all levels of nesting).
> How to do it?
>
>
> Regards
>
> Nols Smit
>
>
> [Non-text portions of this message have been removed]
>