如何更正sql表中的插入查询中的问题 [英] how to rectify the problem in insert query in sql table

查看:54
本文介绍了如何更正sql表中的插入查询中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

use regimen 
SET IDENTITY_INSERT data  ON 
insert into data (firstname,lastname,quantity,rollno) values ('tiGzdrVVzyGzHGEOuRPBYwuFZpKaVYqQbSZYsEHyjRKt','PsqAmzUFTW',62313539.54,03615) 
SET IDENTITY_INSERT  data OFF 



插入时出现此错误



while inserting i got this error

Arithmetic overflow error converting numeric to data type numeric.
The statement has been terminated.



我在这方面犯了什么错误?谁能说出解决我的问题的解决方案



what i made mistake in this? can anyone say solution to solve my problem

推荐答案

看看您的数量字段定义

您尝试将62313539.54插入此字段,如果您的字段定义为诸如numeric(4,2)之类的内容,则会看到此错误.

对于该数字,字段定义必须至少为数字(10,2)
Have a look at your quantity field definition

You are trying to insert 62313539.54 into this field, if your field is defined as something like numeric(4,2) you will see this error.

For that number, the field definition needs to be at least numeric(10, 2)


这篇关于如何更正sql表中的插入查询中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆