Reputation: 2438
I have a table in MS SQL where I have a TERMINAL varchar(50)
column and I have a unique key on it.
I get a UK key violation exception when I try to insert record 'HOST1' and then 'HOST1 '.
Why MS sql handles these two strings as they would be the same?
Thanks Z
Upvotes: 3
Views: 191
Reputation: 1057
I believe that MS SQL strips the white space at the end for VARCHAR.
Upvotes: 5