无法在具有唯一索引的对象'dbo.test'中插入重复的键行 [英] Cannot insert duplicate key row in object 'dbo.test' with unique index

查看:834
本文介绍了无法在具有唯一索引的对象'dbo.test'中插入重复的键行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..

在SQL Server表中,Iam得到错误...无法在对象'dbo.test'中插入具有唯一索引'IX_testid'的重复键行。重复的键值是(< null>)。



请帮我这个怎么办



我尝试了什么:



我无法解决此错误。

Hi..
In SQL Server table,Iam Getting error like ...Cannot insert duplicate key row in object 'dbo.test' with unique index 'IX_testid'. The duplicate key value is (<null>).

Please help me on this what to do

What I have tried:

I am not getting what to do with this error .

推荐答案

你在插入执行期间一直传递NULL值。



唯一键不会允许表的重复值



确保在执行声明之前输入应该是唯一的。



如需更好的信息,请分享你的代码。
You are passing NULL values all the time during Insert execution.

Unique key will not be going to allow duplicate values to a table

Make sure your input should be unique always before execution of a statement.

For better information please share your code.


这篇关于无法在具有唯一索引的对象'dbo.test'中插入重复的键行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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