DECLARE
@I
INT
SELECT
@I=123456
SELECT
CAST
(
CAST
(@I
AS
varbinary(16))
AS
UNIQUEIDENTIFIER)
SELECT
CAST
(
CAST
(@I
AS
binary
(16))
AS
UNIQUEIDENTIFIER)
SELECT
CAST
(
CAST
(@I
AS
binary
(4))+
CAST
(@I
AS
binary
(4))+
CAST
(@I
AS
binary
(4))+
CAST
(@I
AS
binary
(4))
AS
UNIQUEIDENTIFIER)
SELECT
CAST
(
CAST
(REPLICATE(
CAST
(@I
AS
binary
(4)),4)
AS
binary
(16))
AS
UNIQUEIDENTIFIER)
SELECT
CAST
(
CAST
(HASHBYTES(
‘MD5‘
,
CAST
(@I
AS
varbinary(4)))
AS
binary
(16))
AS
UNIQUEIDENTIFIER)
SELECT
CAST
(
CAST
(HASHBYTES(
‘MD5‘
,
CAST
(@I
AS
varchar
(20)))
AS
binary
(16))
AS
UNIQUEIDENTIFIER)
时间: 2024-11-09 05:52:08