inttohex

Returns the platform-independent hexadecimal equivalent of the specified integer, without a “0x” prefix.

Syntax

inttohex(integer_expression)

Parameters

Examples

Usage

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.

See the Transact-SQL Guide for more information about datatype conversion..

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute inttohex.

Related reference
convert
hextobigint
hextoint