Identity column ‘%.*ls’ must be of data type int, bigint, smallint, tinyint, or decimal or numeric with a scale of 0, and constrained to be nonnullable

Error Message:
Msg 2749, Level 16, State 2, Line 1
Identity column ‘%.*ls’ must be of data type int, bigint, smallint, tinyint, or decimal or numeric with a scale of 0, and constrained to be nonnullable.

Severity level:
16.

Description:
This error message appears when you try to specify an invalid data type for an Identity column.

Consequences:
The T-SQL statement can be parsed, but causes the error at runtime.

Resolution:
Error of the Severity Level 16 are generated by the user and can be fixed by the SQL Server user. You must use a valid data type for the Identity column.

Versions:
All versions of SQL Server.

Example(s):
CREATE TABLE t
(
 c1 FLOAT IDENTITY
)

Remarks:
Because the data type FLOAT is not in the list of valid data types for an Identity column, the error is raised.




Array

No comments yet... Be the first to leave a reply!