> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# BIGINT

> BIGINT 是 8 字节有符号整数，取值范围为 [-9223372036854775808, 9223372036854775807]。

## 描述

8 字节有符号整数，范围 \[-9223372036854775808, 9223372036854775807]。

## 示例

创建表时指定字段类型为 BIGINT。

```sql theme={null}
CREATE TABLE bigIntDemo (
    pk BIGINT(20) NOT NULL COMMENT "Range: -2^63 to 2^63-1"
) ENGINE=OLAP
DUPLICATE KEY(pk)
DISTRIBUTED BY HASH(pk) BUCKETS 1;

INSERT INTO bigIntDemo VALUES (123456789012345), (9223372036854775807);
```

```Plaintext theme={null}
MySQL > SELECT * FROM bigIntDemo;
+---------------------+
| pk                  |
+---------------------+
|     123456789012345 |
| 9223372036854775807 |
+---------------------+
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.