-846 INVALID SPECIFICATION OF AN IDENTITY COLUMN OR SEQUENCE OBJECT object-type object-name. REASON CODE = reason-code
Explanation
For an identity column or sequence, the specification of an attribute in a CREATE or ALTER statement might be invalid.
- object-type
- The type of object.
- object-name
- The name of the object.
- reason-code
- The reason for the message or SQL code,
indicated by one of the following
values:
- 1
- The underlying data type of the identity column or sequence object is not supported. Identity columns and sequence objects support the following data types: SMALLINT, INTEGER, BIGINT, and DECIMAL (or NUMERIC) with a scale of zero.
- 2
- The value for START WITH, INCREMENT BY, MINVALUE, MAXVALUE, or RESTART WITH is outside the range for the data type of the identity column or sequence object. If the sequence being altered is DSNSEQ_IMPLICITDB, the value for MAXVALUE is outside the range between 1 and 60000, inclusive.
- 3
- MINVALUE must be less than or equal to MAXVALUE.
- 4
- An invalid value was specified for CACHE. The value must be an INTEGER with a minimum value of 2.
- 5
- An edit procedure that is defined with row attribute sensitivity was specified for the identity column.
- 6
- An identity column was specified for a global temporary table that was already defined by a CREATE GLOBAL TEMPORARY TABLE statement. This error could occur for a CREATE GLOBAL TEMPORARY TABLE statement, or an ALTER TABLE statement for a global temporary table when there is an attempt to add an identity column to an existing global temporary table that was already defined by a CREATE GLOBAL TEMPORARY TABLE statement.
System action
The statement cannot be processed.
Programmer response
Correct the syntax and resubmit the statement.
SQLSTATE
42815