MS SQL unique key - bug or feature?

I have a table in MS SQL where I have a column TERMINAL varchar(50)

and I have a unique key. I am getting a UK keyword violation exception when I try to insert a "HOST1" record and then "HOST1". Why does MS sql handle these two lines as they will be the same?

Thanks Z

+3


source to share


1 answer


I believe MS SQL imposes a space at the end for VARCHAR.



+5


source







All Articles