在sql脚本中找到确切的错误行号

时间:2013-05-13 01:43:05

标签: sql sql-server

我试图将每个insert语句的近1000条记录插入名为ZonePlaces的表中。这张表有一个索引。

当我尝试在此表上运行插入脚本时,它会抛出错误

Msg 2601, Level 14, State 1, Line 56
Cannot insert duplicate key row in object 'dbo.ZonePlaces' with unique index 'IX_ZonePlaces'.

第56行是Insert语句的开头。 我知道我正在插入一些重复的值,但有没有办法找到哪个确切的行号有错误?

希望我很清楚。

0 个答案:

没有答案