Subject Re: [ib-support] How many rows were affected?
Author Nando Dessena

> >if I issue an update or delete statement inside a stored procedure, and
> >want to know how many rows the statement has affected *from within the
> >SP code*, is there a way?
> >I know the information is accessible via the API, I just need it in the
> >SP.
> Given the way the engine works, updating or deleting in a for select
> loop is very nearly as fast as a mass update or delete. Since the
> procedure succeeds or fails as a unit, you get the same statement
> level error unwind. So, just do a for select and keep a count.

thanks; I assume this will be faster that doing a select count() first
and then the actual delete, isn't it?