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 aBIGINTtype value. If the value is outside theINTrange, it will automatically be converted toBIGINTtype even without theLsuffix.
Example
- Insert a positive
BIGINTvalue:
- Insert a negative
BIGINTvalue:
- Insert a
BIGINTvalue without theLsuffix (if the value is within theINTrange, it will be implicitly converted toINT):
- Use
BIGINTtype values for comparison in queries:
Notes
- When using the
BIGINTtype 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.
