The New Home of Oracle-wiki.net
All things oracle...
A website for IT Professionals involved with Oracle database.
The IGNORE_ROW_ON_DUPKEY_INDEX hint is a useful tool for handling unique key violations during a single table INSERT operation. It offers a way to gracefully bypass errors and continue processing the remaining rows in your data load.
When a unique key violation is detected the hint is triggerd and the the row is discarded, before the statement moves on to the next row.
Notes
The specified index must exist and be unique to ensure correct behavior.
Only one index can be targeted with the hint per INSERT statement.
You cannot use CHANGE_DUPKEY_ERROR_INDEX and IGNORE_ROW_ON_DUPKEY_INDEX together in the same statement.
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(myTab1 myInd1) */
INTO myTab1(myCol1) VALUES(123)
/
Published on
Published 6th December 2024