可以通过pwdencrypt完成加密
同样密码加密后生成结果都是不同的,不可逆

Create Table User_PiaoQingSong(Up_Id int identity(1,1),Up_Name varchar(100),Up_Password varbinary(256))

declare @User varchar(100),@Password varchar(100)
select   @User='Pqs',@Password='LiaoNing'

--Insert
insert into dbo.User_PiaoQingSong (Up_Name,Up_Password) select @User,convert(varbinary(256), pwdencrypt(@Password))

--Update
Update User_PiaoQingSong Set Up_Password= convert(varbinary(256), pwdencrypt(@Password)) WHERE  id = 1

--查询
Select  * from User_PiaoQingSong where Up_Name=@User   and pwdcompare(@Password,Up_Password)=1

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-08
  • 2021-09-26
猜你喜欢
  • 2022-12-23
  • 2022-02-06
  • 2022-03-07
  • 2022-01-26
  • 2021-12-31
  • 2021-09-05
  • 2021-08-22
相关资源
相似解决方案