9951 explained code solutions for 126 technologies


clickhouseConvert hex to int


SELECT toInt32(unhex('313233'))ctrl + c
unhex(

converts given HEX to string

toInt32(

converts text to int (32 bytes, but can use any of available converters)

313233

sample HEX num (which is 123 int)


Usage example

SELECT toInt32(unhex('313233'))
output
┌─toInt32(unhex('313233'))─┐
│                      123 │
└──────────────────────────┘