- Consider casting to
unsignedorsigned - Cast to
integerinstead (supports 38 decimal digits on this platform) - Doesn’t fail on non-numeric input
- Cast to
int64instead
The SQL cast specification converts a value to the named data type.
SELECT CAST(column_name AS BIGINT)
FROM …Related
Bigintin other places: column type.Product specific cast functions:
try_cast,safe_cast,::,convert.
Normative References
ISO/IEC 9075-2:2023 defines integer (E011-01, “INTEGER and SMALLINT data types (including all spellings)”) and the cast specification (F201).

