Delete records
db_deleteDelete records from an Oracle database table with a required WHERE clause, row limit safety, and optional dry run to preview affected rows.
Instructions
Delete one or more records from an Oracle database table using parameterized named binds.
Safety features:
WHERE clause is REQUIRED (deletes without conditions are blocked)
Pre-counts matching rows and refuses if exceeding DML_MAX_ROWS (default: 1000)
dry_run mode previews SQL + affected row count
Example: table_name: "users" where: "id = :w_1 AND status = :w_2" where_params: [42, "inactive"] dry_run: false
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| where | Yes | WHERE clause with named bind variables (:w_1, :w_2, ...). Example: 'id = :w_1' | |
| dry_run | No | If true, return the generated SQL and affected row count without executing. | |
| table_name | Yes | Target table name | |
| where_params | Yes | Values for :w_1, :w_2, ... in order. |