# UpsertStatement

constructor(table: Table, vararg keys: Column<*>, onUpdateExclude: List<Column<*>>?, where: Op<Boolean>?)

#### Parameters

table

Table to either insert values into or update values from.

keys

(optional) Columns to include in the condition that determines a unique constraint match. If no columns are provided, primary keys will be used. If the table does not have any primary keys, the first unique index will be attempted.

onUpdateExclude

List of specific columns to exclude from updating. If left null, all columns will be updated with the values provided for the insert.

where

Condition that determines which rows to update, if a unique violation is found. This clause may not be supported by all vendors.

constructor(table: Table, vararg keys: Column<*>, onUpdate: List<Pair<Column<*>, Expression<*>>>?, onUpdateExclude: List<Column<*>>?, where: Op<Boolean>?)

### Deprecated

This constructor with `onUpdate` that takes a List may be removed in future releases.