While inserting a record to my table table1
in SQL Server 2008
instance, I'm getting the following error
Msg 2627, Level 14, State 1, Line 1
Violation of UNIQUE KEY constraint 'IX_table1'. Cannot insert duplicate key in object 'dbo.table1'.
But while executing the same query in SQL Server 2014
(copy of the above database), I am getting some difference in the error messsage
Msg 2627, Level 14, State 1, Line 2
Violation of UNIQUE KEY constraint 'IX_table1'. Cannot insert duplicate key in object 'dbo.table1'.
The duplicate key value is (xxx, ).
In 2014 the error message specifies the duplicated value in the message (The duplicate key value is xxx
), but in 2008 it does not.
Why this? Is this a new feature on 2014? or there is any settings to change/format the error messages?