Posted by Ed Murphy on 09/12/06 15:54
Andrzej Jaworek wrote:
> I have a "tree" table:
>
> Id - primary key
> ParrentId - (foreign key) related to Id
> Title
> .....
>
> when I delete some record I want to delete it with all childs (cascade
> deleting). I can't set cascade deleting on the same table :(. Is there
> any easy way in the MSSQL 2005 to do this ? There is one idea - using
> cursors + recursive functions but I think this solution is not easy
> and elegant.
Another idea is to split ParentId off into a second table, but that's
probably even less easy and elegant.
Navigation:
[Reply to this message]
|