MS SQL:
Create:
token binary(32)
Insert:
HASHBYTES('md5', CONVERT (varchar, RAND(CHECKSUM(NEWID())))) + HASHBYTES('md5', CONVERT (varchar, SYSDATETIME()))
Selec (Get String)
convert(varchar(max),token,2)
Select (Query String)
token=convert(binary(32), 'token_hex_string', 2)
MYSQL:
Create:
token binary(32)
Insert:
unhex(CONCAT(MD5(uuid()),MD5(now())))
Selec (Get String)
hex(token)
Select (Query String)
token=unhex('token_hex_string')
相關文章:
SQL Server hex string to varbinary conversion
https://stackoverflow.max-everyday.com/2018/04/sql-server-hex-string-to-varbinary-conversion/
你好 怎么联系你 可以发个email给我吗
[email protected]