# insertReturning

fun <T : Table> T.insertReturning(returning: List<Expression<*>> = columns, ignoreErrors: Boolean = false, body: T.(InsertStatement<Number>) -> Unit): ReturningSuspendExecutable

Represents the SQL statement that inserts new rows into a table and returns specified data from the inserted 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.

ignoreErrors

Whether to ignore any possible errors that occur during the process. Note `INSERT IGNORE` is not supported by all vendors. Please check the documentation.

#### Samples

org.jetbrains.exposed.v1.r2dbc.sql.tests.shared.dml.ReturningTests.testInsertReturning