Is it possible to calculate MD5 hash directly in T-SQL language?
问题 I need to hash (MD5) all the password in our Sql Server 2000 database. I can easily generate a C#/VB.NET program to convert (hash) all the passwords, but I was wondering (more for my education than for a real compelling need) if it was possible to calculate MD5 hash directly in T-SQL. Thanks to anyone who will answer. 回答1: It is using this code, but it is not native to the language. http://www.codeproject.com/KB/database/xp_md5.aspx 回答2: In 2005 and later, you can call the HashBytes()