We face a very weird issue.
we have one table in our mssql 2008 R2 db when table column is the follow:
- userId - int
- userName - varbinary(256)
- userType - int
and userName column is unique
we preform the following query again the table:
insert into table_name (userId, userName, userType) values ( 1 , 0x5942C803664B00, 0)
and after that query we do the following query :
insert into table_name (userId, userName, userType) values ( 2 , 0x5942C803664B, 0)
and we get the following Error:
Cannot insert duplicate key row in object 'table_name ' with unique index 'table_name _userName_u'.
although 0x5942C803664B and 0x5942C803664B00 are different values??
Any idea ?