需要对SQL中的大数字数字执行操作(即大于38) [英] Need to perform operations on large digit numbers in SQL (i.e greater than 38)
本文介绍了需要对SQL中的大数字数字执行操作(即大于38)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello CP,
任何人都可以帮我解决我应该用什么数据类型对大于38位数的值执行操作。尝试了不同的数据类型,谷歌和逻辑分割存储它们但都是徒劳的。
提前谢谢。
Hello CP,
Can anyone help me out on what datatype should I use to perform operations on values of greater than 38 digits. Tried different datatypes,google & logic to split store them but all in vain.
Thanks in advance.
推荐答案
它超出了SQL容量,你会得到
将表达式转换为数据类型bigint的算术溢出错误。 br />
我只试过19位数字
Hi,
it's beyond SQL capacity and you will have
"Arithmetic overflow error converting expression to data type bigint."
I have try tis only with 19 digits
declare @bigint1 bigint = 9223372036854775807;
select @bigint1 * @bigint1
Bechir。
Bechir.
这篇关于需要对SQL中的大数字数字执行操作(即大于38)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文