Actions6
- Database Actions
Database → Delete
AI-generatedSummary
Delete records from a MySQL table, optionally truncating or dropping it
Inputs
- table (required) — The target table; can be selected from a list or entered as a name
- deleteCommand — Choose operation type: 'truncate' (remove all data, keep structure), 'delete' (conditional delete), or 'drop' (remove table and structure)
- where — Collection of conditions for 'delete' mode; each condition defines column, operator, and value
- combineConditions — Logic for combining multiple 'where' conditions: 'AND' requires all true, 'OR' requires any true
- options — Various execution options such as connection timeout, query batching, output format, etc.
Output shape
success indicator; for 'delete' mode may include affected row count
Returns a confirmation object; if conditions are applied the result may contain the number of rows deleted, otherwise just success status
Examples
Example 1: Delete all rows from a table without conditions
table = 'users', deleteCommand = 'delete', where empty, combineConditions = 'AND'
Example 2: Truncate a table to remove all data
table = 'logs', deleteCommand = 'truncate'
Example 3: Conditional delete of archived orders
table = 'orders', where = [{column='status',condition='equal',value='archived'}], combineConditions='AND'