Is there a way to generate MD5 Hash string of type varchar(32) without using fn_varbintohexstr
SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5', 'email@dot.com')), 3, 32)
So it could be used inside a view with SCHEMABINDING
Is there a way to generate MD5 Hash string of type varchar(32) without using fn_varbintohexstr
SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5', 'email@dot.com')), 3, 32)
So it could be used inside a view with SCHEMABINDING
try this:
For data up to 8000 characters use:
Demo
For binary data (without the limit of 8000 bytes) use:
Demo
Solution:
Use HashBytes
That will give you 0xF53BD08920E5D25809DF2563EF9C52B6
-
That will give you F53BD08920E5D25809DF2563EF9C52B6