SQL Reference Guide > SQL Reference Guide > SQL Statements > MODIFY > MODIFY...TO UNIQUE_SCOPE=STATEMENT|ROW
Was this helpful?
MODIFY...TO UNIQUE_SCOPE=STATEMENT|ROW
To defer the uniqueness check until the end of statement execution (for unique indexes or base table structures), specify the MODIFY...TO UNIQUE_SCOPE = STATEMENT|ROW option. This statement allows more than one row to contain the same value for a declared unique column during the processing of an update statement, as long as the column values are unique at the end of the statement. These semantics are required to support ANSI uniqueness constraints.
This MODIFY statement is necessary when using a pre-existing secondary index or the base table structure for a unique constraint. When an index is constructed specifically for a unique constraint definition (even when the definition includes a constraint WITH clause), the UNIQUE_SCOPE attribute is set automatically.
Last modified date: 01/30/2023