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
works for me.
None of the other answers worked for me. Note that SQL Server will give different results if you pass in a hard-coded string versus feed it from a column in your result set. Below is the magic that worked for me to give a perfect match between SQL Server and MySql