BIGINT
BIGINT
is a data type used to represent 8-byte signed integers. Its value range is from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. This type is typically used to store very large integer values.
Syntax
digit
: Represents any digit from 0 to 9.L
: Represents a literal suffix used to indicate that this is aBIGINT
type value. If the value is outside theINT
range, it will automatically be converted toBIGINT
type even without theL
suffix.
Example
- Insert a positive
BIGINT
value:
- Insert a negative
BIGINT
value:
- Insert a
BIGINT
value without theL
suffix (if the value is within theINT
range, it will be implicitly converted toINT
):
- Use
BIGINT
type values for comparison in queries:
Notes
- When using the
BIGINT
type to store values, please ensure the values are within the allowed range, otherwise it may cause overflow errors. - When performing numerical comparisons or calculations, be aware of implicit conversions between data types to avoid unexpected results.