-190 THE ATTRIBUTES SPECIFIED FOR THE COLUMN table-name.column-name ARE NOT COMPATIBLE WITH THE EXISTING COLUMN DEFINITION
Explanation
The attributes for the column in an ALTER TABLE statement are not compatible with the attributes of the existing column.
- table-name
- The name of the table.
- column-name
- The name of the column.
Possible reasons for this error include:
- Incompatible data type
- The ALTER TABLE ALTER COLUMN SET DATA TYPE statement allows changing
columns of the following data types only:
- Character
- Numeric
- Binary
If the SET DATA TYPE clause was specified, the existing column is not compatible with the new data type that was specified, or is of a data type that cannot be changed.
- Identity column is required
- The following clauses can be specified only for a column that
is defined as an identity column:
- RESTART
- SET GENERATED
- SET INCREMENT BY
- SET MINVALUE and SET NO MINVALUE
- SET MAXVALUE and SET NO MAXVALUE
- SET CYCLE and SET NO CYCLE
- SET CACHE and SET NO CACHE
- SET ORDER and SET NO ORDER
If one of these clause was specified, the existing column is not defined as an identity column.
- Default values
- If a SET DEFAULT or DROP DEFAULT clause was specified, the existing
column either:
- Does not have a defined default value, or the column has NOT NULL as the null attribute.
- Is defined as an identity column, ROWID, or row change timestamp column.
- Changing ROW BEGIN, ROW END, or TRANSACTION START ID columns
- If ALTER COLUMN was specified to change the column to a ROW BEGIN,
ROW END, or TRANSACTION START ID column:
- The column is already defined as a generated column.
- The column is already defined with a user-specified default value. Issue an ALTER TABLE statement to drop the default value. Then the column definition can be changed.
System action
The statement cannot be processed.
Programmer response
Review the SQL statement and take the appropriate action, then resubmit the statement.
- Modify the statement so that the attributes that are specified for the altered column are compatible with the existing column definition.
- Remove the incompatible attribute specification.
- Specify a different column.
SQLSTATE
42837