I did some testing, and it seems that this improvement of the message was introduced in SQL 2008. That is, I get it on SQL 2008, but not on SQL 2005 or SQL 2000.
From which version did SQL Server start showing the actual duplicate value in primary key violations
mo boy
396
Reputation points
Dear Experts, Could you please let me know from which version did SQL Server start showing the actual duplicate values in primary key violations. Take for example, in some older versions, I only see something like this. "Violation of PRIMARY KEY constraint . Cannot insert duplicate key in object blah" Whereas in later versions, we can see the duplicate values which is way more useful. "Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object blah. The duplicate key value is (2331). " Thanks,