INTTOHEX function [Data type conversion]

Returns a string containing the hexadecimal equivalent of an integer.

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

Returns

VARCHAR

Remarks

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

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

Example

The following statement returns the value 0000009c.

SELECT INTTOHEX( 156 );