CREATE FUNCTION [dbo].[f_base64_encode]
(@bin varbinary(max))
returns varchar(max)
as begin
return cast(N'' as xml).value('xs:base64Binary(xs:hexBinary(sql:variable("@bin")))', 'varchar(max)')
end
GO

CREATE FUNCTION [dbo].[f_base64_decode]
(@64 varchar(max))
returns varbinary(max)
as begin
return cast(N'' as xml).value('xs:base64Binary(sql:variable("@64"))', 'varbinary(max)')
end
GO

 

相关文章:

  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
  • 2021-10-06
  • 2022-12-23
  • 2021-09-03
相关资源
相似解决方案