Hi,
Currently investigating hashbytes for multiple column comparisons. The reason I want to investigate is storing the hash in a column and i'm currently determining what data type would be best to store the data. We are using SHA1 algoritm and therefore hashbytes gives a varbinary(20) and therefore storing the data in a binary (20) would be a appropriate choice. Right?
Well, in our comparison scripts we've converted the hashbytes value to nvarchar and this gives a (data) length back of 20.. Should i use this as a base for storing the hashbytes results? Or should i store the binary and convert it to nvarchar? Or should the comparison made based on on binary instead of nvarchar?
Another thing that came to my mind is storing the value in a Nchar or char field because the length of the returnvalue of the function hashbytes is fixed. Is that an idea? A little performance gain?
Gr,
Hennie