Is there a way to generate MD5 Hash string of type varchar(32) without using fn_varbintohexstr
SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes(\'MD5\', \'em
For data up to 8000 characters use:
CONVERT(VARCHAR(32), HashBytes('MD5', 'email@dot.com'), 2)
Demo
For binary data (without the limit of 8000 bytes) use:
CONVERT(VARCHAR(32), master.sys.fn_repl_hash_binary(@binary_data), 2)