TSql HASHBYTES 用法
时间:2021-07-01 10:21:17
帮助过:4人阅读
TABLE [dbo].
[test]
(
[code] [int] NULL,
[name] [varchar](
10)
NULL,
[txt] [nvarchar](
10)
NULL
)
insert into dbo.test(code)
values(
1)
print HASHBYTES(
‘MD5‘,
‘1‘)
--0xC4CA4238A0B923820DCC509A6F75849B
select *
from dbo.test
where HASHBYTES(
‘MD5‘,
cast(code
as varchar))
=0xC4CA4238A0B923820DCC509A6F75849B
MSDN URL is belowing:
https://msdn.microsoft.com/zh-cn/library/ms174415.aspx
TSql HASHBYTES 用法
标签: