Subject Re: [firebird-support] sql to check if a row has been used in related tables?
Author Lucas Franzen
Milan,

Milan Babuskov schrieb:
> Lucas Franzen wrote:
>> if all your fields are defined as foreign keys you can do a delete on
>> the master record and get the AffectedRows. If the result is bigger than
>> 1
>
> Last time I checked the result is always the number of affected rows in
> master table (i.e. one) even if it deletes a thousand records in child
> tables. Has this been changed in some recent versions of FB?

You're right.
Affected rows or ROW_COUNT will just return 1 for the delete of the
master record.


Luc.