SQL Server 2016(13.0.1722) で。
declare @i int = -1
select convert(varchar(8), cast(@i as varbinary(4)), 2 )
出力はこんな感じ
FFFFFFFF
(1 行処理されました)
convert の type を 1 にすれば "0x"付きで出力される。
Go to list of users who liked
More than 5 years have passed since last update.
SQL Server 2016(13.0.1722) で。
declare @i int = -1
select convert(varchar(8), cast(@i as varbinary(4)), 2 )
出力はこんな感じ
FFFFFFFF
(1 行処理されました)
convert の type を 1 にすれば "0x"付きで出力される。
Register as a new user and use Qiita more conveniently
Go to list of users who liked