INTTOHEX function [Data type conversion]

Returns a string containing the hexadecimal equivalent of an integer.

The CAST, CONVERT, HEXTOINT, and INTTOHEX functions can be used to convert to and from hexadecimal values. For more information on using these functions, see Converting to and from hexadecimal values.

Syntax
INTTOHEX( integer-expression )
Parameters
  • integer-expression   The integer to be converted to hexadecimal.

See also
Standards and compatibility
  • SQL/2003   Transact-SQL extension.

Example

The following statement returns the value 0000009c.

SELECT INTTOHEX( 156 );