SQL Server/T-SQL Tutorial/System Tables Views/sys.fn varbintohexstr

Материал из SQL эксперт
Перейти к: навигация, поиск

sys.fn_varbintohexstr function

4> DECLARE @sql AS NVARCHAR(4000),
5>   @b AS VARBINARY(1000), @s AS VARCHAR(2002);
6> SET @b = 0x0123456789ABCDEF;
7> SET @s = sys.fn_varbintohexstr(@b);
8> SELECT @s;
9> GO





--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--
0x0123456789abcdef