BIGINT type

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime

Represents 8-byte signed integer numbers.

Syntax

{ BIGINT |
  LONG }

Limits

The range of numbers is from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

Literals

[ + | - ] digit [ ... ] [L]

digit: Any numeral from 0 to 9.

If the literal is not post-fixed with L (or l) and it is within the range for an INT it will be implicitly turned into an INT.

Examples

> SELECT +1L;
  1

> SELECT CAST('5' AS BIGINT);
  5

> SELECT typeof(-2147483);
  INT

> SELECT typeof(123456789012345);
  BIGINT