insertIgnore
Represents the SQL statement that inserts a new row into a table, while ignoring any possible errors that occur during the process.
For example, if the new row would violate a unique constraint, its insertion would be ignored. Note: INSERT IGNORE
is not supported by all vendors. Please check the documentation.
Samples
org.jetbrains.exposed.sql.tests.shared.dml.InsertTests.testInsertIgnoreAndGetIdWithPredefinedIdRepresents the SQL statement that uses data retrieved from a selectQuery to insert new rows into a table, while ignoring any possible errors that occur during the process.
Note: INSERT IGNORE
is not supported by all vendors. Please check the documentation.
Return
The number of inserted rows, or null
if nothing was retrieved after statement execution.
Parameters
Source SELECT
query that provides the values to insert.
Columns to insert the values into. This defaults to all columns in the table that are not auto-increment columns without a valid sequence to generate new values.