SQL Server/T-SQL Tutorial/System Functions/fn varbintohexstr
Invoking the fn_varbintohexstr() Scalar Function
5>
6> SELECT master.dbo.fn_varbintohexstr(0x0123456789abcdef)
7> GO
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
----------------
0x0123456789abcdef
(1 rows affected)
1>