You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Amir Michail <am...@gmail.com> on 2007/09/14 21:57:10 UTC
deleting rows with dependencies
Hi,
Is there a way to delete rows while automatically deleting other rows
dependent on those rows?
Amir
Re: deleting rows with dependencies
Posted by Bryan Pendleton <bp...@amberpoint.com>.
> Is there a way to delete rows while automatically deleting other rows
> dependent on those rows?
There are a number of ways. Here's three:
1) ON DELETE CASCADE
2) Write a trigger for the table which implements the delete logic.
3) Always update the table via a stored procedure, and have that
stored procedure implement your delete propagation logic.
thanks,
bryan