Subject | RE: [firebird-support] Help with a DELETE command |
---|---|
Author | Alan McDonald |
Post date | 2004-12-05T21:46:38Z |
> Without using ON DELETE or Triggers, how can I best do the following?You could use foreing key cascade delete - that's not on delete or triggers
>
> DELETE
> FROM Child JOIN Parent ON Child.F_ID = Parent.F_CHILD_ID
> WHERE Parent.F_FOO = 1;
>
> I know the above is illegal, but it captures the query I would like to
> delete with. I tried the following but for some reason it locked up the
> database completely -- not even an error message:
>
> DELETE
> FROM Child
> WHERE Child.F_ID
> IN (SELECT Parent.F_CHILD_ID FROM Parent WHERE
> Parent.F_FOO = 1);
>
> Any thoughts?
>
> Btw, this is FB 1.0.3 on Windows.
to you but it's still triggers in the database.
Alan