Specified column precision is greater than the max

2019-08-16 15:03发布

I am creating a new SP(Stored Procedure) in SQL Server 2008 and it will gives me an error i.e.

Specified column precision 52 is greater than the maximum precision of 38

I can't understand that why this error occurs?

Please let me explain why this error occurs and how can i solve this error.

2条回答
走好不送
2楼-- · 2019-08-16 15:42

I got my mistake and really this is a silly mistake which generated by me by mistake. I declared a parameter which datatype is decimal and by mistake i tool decimal's length 52. so it given an error because decimal maximum length id 38.

查看更多
Melony?
3楼-- · 2019-08-16 15:53

The system told you why the error occurred.

You asked a precision of 52, but the maximum default precision is only 38. So the system can not give you the precision you asked.

See: http://msdn.microsoft.com/en-us/library/ms190476.aspx

"In SQL Server, the default maximum precision of numeric and decimal data types is 38. In earlier versions of SQL Server, the default maximum is 28."

查看更多
登录 后发表回答