By specifying an ALTER definition (alter_definition) in the ALTER TABLE statement, you can change CONSTRAINT or key definitions.
<alter_definition> ::=
ALTER CONSTRAINT <constraint_name>
CHECK <search_condition>
| ALTER <key_definition>
The Constraint name must identify a CONSTRAINT definition in the table. If the specified search condition is not violated by any row in the table, it replaces the existing search condition of the CONSTRAINT definition. Otherwise, the ALTER TABLE statement fails.
The key specified by the key definition replaces the current key in the table. The columns specified in the key definition must identify columns in the table and have the key property.
If a column of the key to be replaced is a referenced column (referenced_column) of a referential CONSTRAINT definition, the ALTER TABLE statement will fail.
With large tables, in particular, this may take more time, since extensive copy operations have to be carried out.