# batchReplace

open fun <T : Table, E : Any> T.batchReplace(shouldReturnGeneratedValues: Boolean = true, body: BatchReplaceStatement.(E) -> Unit): BatchReplaceStatement

Represents the SQL statement that either batch inserts new rows into a table, or, if insertions violate unique constraints, first deletes the existing rows before inserting new rows.

Note: This operation is not supported by all vendors, please check the documentation.

#### Return

A BatchReplaceStatement that can be executed.

#### Parameters

shouldReturnGeneratedValues

Specifies whether newly generated values (for example, auto-incremented IDs) should be returned.