开发者

Mapping .Net decimal with large number of fraction to SQL Server

开发者 https://www.devze.com 2022-12-11 02:53 出处:网络
If I have a decimal like 32.593170731707329023999999999 - what SQL Datatype, and precision and scale should I use?

If I have a decimal like 32.593170731707329023999999999 - what SQL Datatype, and precision and scale should I use?

My integer parts are pretty small (1开发者_Python百科-10000) and fraction part big.

Have tried decimal with different variations of precision and scale, but get an overflow exception in .Net.


You can try this

DECLARE @D DECIMAL(38, 33)

SELECT @D = 10000.593170731707329023999999999 

SELECT @D
0

精彩评论

暂无评论...
验证码 换一张
取 消