Skip to content
Advertisement

Tag: database

PostgreSQL – How to format an int as an hexa

What’s a short/simplest way of formatting an int to an hexa, with leading zeroes? For example I need to format: My query needs many of these conversions I would appreciate a short piece of code instead of a verbose one. Just need to deal with positive numbers. Answer I’m not sure it’s the shortest way but at least I found

Insert a line with different values

How to insert a line ? position the number 12 piece_color the R id 0 and 1 . I want to have two numbers here I did The returned error was: Answer You need to specify the columns to insert if you would like to use VALUES. In your case, it would be something like this:

Advertisement