Skip to content

Tag: postgresql

SQL: Convert integer into formatted hex string

In PostgreSQL, let’s say I have the following table: I want to convert the myInt column into a formatted string that contains the hex representation of the integer in it and rename the column. So it would look something like the following: What would the query look like to convert the integer? Answer Tr…