Subject RE: [firebird-support] Help with a DELETE command
Author Alan McDonald
> Without using ON DELETE or Triggers, how can I best do the following?
>
> 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.

You could use foreing key cascade delete - that's not on delete or triggers
to you but it's still triggers in the database.
Alan