# IBM Db2 - Run custom SQL
This action enables you query IBM Db2 using a custom SQL string. With it, you can run Data Manipulation Language (DML) statements like
DELETE. You can also run Data Definition Language (DDL) commands, like
# Run custom SQL
# Input fields
- Required field
- The required SQL code for selecting rows from your Db2 instance. <br/ ><br/ > If you provide multiple SQL statements, the system runs all statements. However, it only returns the results of the last statement. You must separate statements using the semicolon character, <code>;</code>. <br/ ><br/ > Wrap datapills in single quote characters, <code>'</code>.
- Output fields
- Optional field
- Define the expected fields of each retrieved row. This enables Workato to generate datapills it can use in downstream systems, or to drive Recipe logic. If you do not expect or require return values, ignore this field.
# Output fields
- List of rows returned from the SQL execution.
- Reports the number of rows inserted, updated, or deleted from the SQL string. When running <code>SELECT</code> statements, this will return nil. When executing a DDL (for example, creating a table), the value 0 will be returned.
Last updated: 3/29/2023, 2:00:59 PM