📐
BigQueryで10進数と16進数の相互変換
10進数から16進数
SELECT
65535 AS a,
FORMAT('%x', 65535) AS b
a | b |
---|---|
65535 | ffff |
参考
16進数から10進数
SELECT
'ffff' AS a,
CAST(CONCAT('0x', 'ffff') AS INT64) AS b
a | b |
---|---|
ffff | 65535 |
参考
SELECT
65535 AS a,
FORMAT('%x', 65535) AS b
a | b |
---|---|
65535 | ffff |
SELECT
'ffff' AS a,
CAST(CONCAT('0x', 'ffff') AS INT64) AS b
a | b |
---|---|
ffff | 65535 |
Discussion