Database & utility
Scalar
to_base()
Converts a value to a string in the given base radix, optionally padding with leading zeros to the minimum length
Arguments & returns
2 overloadsto_base(number, radix)
Scalar
| Overload link | number | radix |
Returns |
|---|---|---|---|
| #01 | BIGINT | INTEGER |
VARCHAR |
to_base(number, radix, min_length)
Scalar
| Overload link | number | radix | min_length |
Returns |
|---|---|---|---|---|
| #02 | BIGINT | INTEGER | INTEGER |
VARCHAR |
Example
Haybarn WASM 1.5.5-rc3 · In your browser
Engine example · Run to view results.
Catalog examples
SELECT
to_base(42, 16);