Subject Re: Delete with join and delete from multiple tables
Author Adam
--- In, Tim Gahnström
<tim.gahnstrom@...> wrote:
> Hi
> I am running firebird 1.5 and cannot seem to figure out how to
delete from one table based on data in another table.
> How can I implement:
> Delete from A where in (select id from XXX, YYY where z=q)

This is the only way unfortunately, and as you have probably
discovered it can be slow.

On Firebird 1.5, the only other real option is to a stored procedure,
using a for select loop to identify the records of interest then
issuing a delete for each record. With Firebird 2 you can use execute
block syntax as an alternative.