if u just want to get count of rows affected u can use :
GET DIAGNOSTICS Statement
The GET DIAGNOSTICS statement returns information about the most recently run SQL
statement. One can either get the number of rows processed (i.e. inserted, updated, or deleted),
or the return status (for an external procedure call).
In the example below, some number of rows are updated in the STAFF table. Then the count
of rows updated is obtained, and used to update a row in the STAFF table:
BEGIN ATOMIC
DECLARE numrows INT DEFAULT 0;
UPDATE staff
SET salary = 12345
WHERE ID < 100;
GET DIAGNOSTICS numrows = ROW_COUNT;
UPDATE staff
SET salary = numrows
WHERE ID = 10;
END