DECLARE @OldPWD varchar(255)
DECLARE @EncryptedPWD varbinary(255)
SET @OldPWD = '11111'
SELECT @EncryptedPWD = CONVERT(varbinary(255), pwdencrypt(@OldPWD))
SELECT pwdcompare(@OldPWD, @EncryptedPWD)
SELECT pwdcompare('22222', @EncryptedPWD)
pwdencrypt:表加密
pwdcompare:与输入的字符比较