Convert HashBytes to VarChar

前端 未结 7 785
南旧
南旧 2020-12-07 10:08

I want to get the MD5 Hash of a string value in SQL Server 2005. I do this with the following command:

SELECT HashBytes(\'MD5\', \'HelloWorld\')
7条回答
  •  醉酒成梦
    2020-12-07 10:41

    I have found the solution else where:

    SELECT SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5', 'HelloWorld')), 3, 32)
    

提交回复
热议问题