8. SQL Statements : MODIFY : With Clause Options for Modify : Unique_scope
 
Share this page                  
Unique_scope
The UNIQUE_SCOPE option specifies, for tables or indexes with unique storage structures, how uniqueness is checked during an update option.
There are two options:
UNIQUE_SCOPE = ROW
Checks uniqueness as each row is inserted.
UNIQUE_SCOPE = STATEMENT
Checks uniqueness after the UPDATE statement is completed.
Default: UNIQUE_SCOPE = ROW, when first imposing uniqueness on a table.
Specify the UNIQUE_SCOPE option only when modifying to a unique storage structure. For example:
MODIFY mytable TO BTREE UNIQUE WITH UNIQUE_SCOPE = ROW;
If not otherwise specified, a MODIFY does not change the UNIQUE_SCOPE setting.