# updateReturning

fun <T : Table> T.updateReturning(returning: List<Expression<*>> = columns, where: () -> Op<Boolean>, body: T.(UpdateStatement) -> Unit): ReturningBlockingExecutable

Represents the SQL statement that updates rows of a table and returns specified data from the updated rows.

#### Return

A ReturningStatement that will be executed once iterated over, providing ResultRows containing the specified expressions mapped to their resulting data.

#### Parameters

returning

Columns and expressions to include in the returned data. This defaults to all columns in the table.

where

Condition that determines which rows to update.

#### Samples

org.jetbrains.exposed.v1.tests.shared.dml.ReturningTests.testUpdateReturning

fun <T : Table> T.updateReturning(returning: List<Expression<*>> = columns, body: T.(UpdateStatement) -> Unit): ReturningBlockingExecutable

Represents the SQL statement that updates all rows of a table and returns specified data from the updated rows.

#### Return

A ReturningStatement that will be executed once iterated over, providing ResultRows containing the specified expressions mapped to their resulting data.

#### Parameters

returning

Columns and expressions to include in the returned data. This defaults to all columns in the table.

#### Samples

org.jetbrains.exposed.v1.tests.shared.dml.ReturningTests.testUpdateReturning