Returns the platform-independent hexadecimal equivalent of the specified integer.
inttohex (integer_expression)
is the integer value to be converted to a hexadecimal string.
select inttohex (10)
-------- 0000000A
inttohex, a datatype conversion function, returns the platform-independent hexadecimal equivalent of an integer, without a “0x” prefix.
Use the inttohex function for platform-independent conversions of integers to hexadecimal strings. inttohex accepts any expression that evaluates to an integer. It always returns the same hexadecimal equivalent for a given expression, regardless of the platform on which it is executed.
For more information about datatype conversion, see “Datatype conversion functions”.
SQL92 – Compliance level: Transact-SQL extension.
Any user can execute inttohex.