Column or parameter #%d: Specified column precision %d is greater than the maximum precision of %d.

Error Message:
Msg 2750, Level 16, State 1, Line 1
Column or parameter #%d: Specified column precision %d is greater than the maximum precision of %d.

Severity level:
16.

Description:
This error message appears when you try to create a column or a parameter with a greater precision than allowed at most.

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. The statement cannot be executed this way. The precision can only at most be equal to the maximum allowed precision.

Versions:
All versions of SQL Server.

Example(s):
USE tempdb;
GO
IF OBJECT_ID(‘tempdb..#t’) > 0
 DROP TABLE #t
GO
CREATE TABLE #t
(
 id INT NOT NULL,
 d1 DECIMAL(39,0) NOT NULL
)

Remarks:
In the above example we try to create a column of the data type DECIMAL(39,0). Because 39 is greater than the maximum allowed precision of 38 the error is raised.




Array

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