将varchar转换为bigint获取错误 [英] convert varchar to bigint getting error
本文介绍了将varchar转换为bigint获取错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我将varchar列转换为bigint时显示算术溢出转换
错误,请帮我转换一个varchar列到bigint
谢谢,
Ramesh.m
when i convert the varchar column to bigint it shows arithmetic overflow conversion
error , please help me how to convert a varchar column to bigint
Thanks,
Ramesh.m
推荐答案
看看这个:
arithmetic-overflow-error-converting-expression-to-data-type-int [ ^ ]
bigint允许范围...
bigint allow range...
-9223372036854775808 through 9223372036854775807
所以,你有更大的值,所以它会给出这个错误
您可以使用如下数值数据类型...
so, you have larger value so,it will give this error
you can use numeric datatype as below...
select convert(numeric(38,0),'9999999999999999999')
注意:38是数值数据类型的最大数字限制
快乐编码!
:)
note: 38 is max digits limit for numeric datatype
Happy Coding!
:)
这篇关于将varchar转换为bigint获取错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文