# delete

inline fun Join.delete(targetTable: Table, vararg targetTables: Table, ignore: Boolean = false, limit: Int? = null, where: SqlExpressionBuilder.() -> Op<Boolean>): Int

Represents the SQL statement that deletes rows from a table in a join relation.

#### Return

The number of deleted rows.

#### Parameters

targetTable

The specific table from this join relation to delete rows from.

targetTables

(Optional) Other tables from this join relation to delete rows from. Note Targeting multiple tables for deletion is not supported by all vendors. Please check the documentation.

ignore

Whether to ignore any possible errors that occur when deleting rows. Note ignore is not supported by all vendors. Please check the documentation.

limit

Maximum number of rows to delete. Note limit is not supported by all vendors. Please check the documentation.

where

Condition that determines which rows to delete.

#### Samples

org.jetbrains.exposed.sql.tests.shared.dml.DeleteTests.testDeleteWithSingleJoin

fun Join.delete(targetTable: Table, vararg targetTables: Table, ignore: Boolean = false, limit: Int? = null): Int

Represents the SQL statement that deletes all rows from a table in a join relation.

#### Return

The number of deleted rows.

#### Parameters

targetTable

The specific table from this join relation to delete rows from.

targetTables

(Optional) Other tables from this join relation to delete rows from. Note Targeting multiple tables for deletion is not supported by all vendors. Please check the documentation.

ignore

Whether to ignore any possible errors that occur when deleting rows. Note ignore is not supported by all vendors. Please check the documentation.

limit

Maximum number of rows to delete. Note limit is not supported by all vendors. Please check the documentation.

#### Samples

org.jetbrains.exposed.sql.tests.shared.dml.DeleteTests.testDeleteWithSingleJoin

@JvmName(name = "deleteJoinNullableParam")
fun Join.delete(targetTable: Table, vararg targetTables: Table, ignore: Boolean = false, limit: Int? = null, where: SqlExpressionBuilder.() -> Op<Boolean>? = null): Int

### Deprecated

This `Join.delete()` with a nullable `where` parameter will be removed in future releases. Please leave a comment on [YouTrack](https://youtrack.jetbrains.com/issue/EXPOSED-494/Inline-DSL-statement-and-query-functions) with a use-case if a nullable condition cannot be replaced with the new `Join.delete()` overloads.

#### Replace with

    delete(targetTable, targetTables = targetTables, ignore, limit)

Content copied to clipboard