You can use the Database control to perform INSERT, UPDATE, and DELETE operations, which return the number of rows affected.
In the following example, an UPDATE operation is performed and the number of rows affected is returned:
/** * @jc:sql statement="UPDATE customer SET address={customerAddr} WHERE custid={customerID}" */ public int setCustomerAddress (int customerID, String customerAddr);
This example updates the customer table. For each record in the table in which the custid field matches the value of the customerID parameter, the address field is set to the value of the customerAddr parameter.