# IBM Db2 - Update actions

Workato offers both batch and single update row actions. This allows you the flexibility to choose the action that you require for your recipe and to fulfill your business needs. Check out our best practices on whether to use batch or single insert actions and when to use insert, update, or update.

# Update rows

This action allows you to update the columns of multiple rows that match a criteria.

# Input

Field Type Description
Table required Select a table to update. This can be done either by selecting a table from the pick list, or toggling the input field to text mode and typing the full table name.
WHERE condition optional Row(s) that match this specified condition will be updated (e.g. status = true). SQL sub-queries are supported.
Rows > Rows fields optional This is a dynamically generated list of input fields, based on the columns in the target table. Specify what data to insert into each column here.

# Output

Field Description
Rows affected Number of rows that were updated

# Update batch of rows

This action allows you update multiple rows to different values in one step, based on incoming data in a list datapill. This provides higher throughput when you are moving a large number of records from one app to IBM Db2.

# Input

Field Type Description
Table required Select a table to update. This can be done either by selecting a table from the pick list, or toggling the input field to text mode and typing the full table name.
Rows > Rows source list required The datapill to input is the source of the batch of rows to update to the table. This can come from any trigger or action that outputs a list datapill.
Rows > Rows fields optional This is a Dynamically generated list of input fields, based on the columns in the target table. Map data to be inserted from the Rows source list datapill.
Unique key required Select a unique key column to identify rows for the update. Performance can be improved if the selected unique key is indexed.

# Output

Field Description
Rows affected Number of rows that were updated


Last updated: 9/27/2022, 6:49:03 AM