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

# SMALLINT

> SMALLINT 是 2 字节有符号整数，取值范围为 [-32768, 32767]。

## 描述

2 字节有符号整数，范围 \[-32768, 32767]。

## 示例

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

```sql theme={null}
CREATE TABLE smallintDemo (
    pk SMALLINT COMMENT "range [-32768, 32767]"
) ENGINE=OLAP
DUPLICATE KEY(pk)
DISTRIBUTED BY HASH(pk) BUCKETS 1;

INSERT INTO smallintDemo VALUES (32767);
```

```Plaintext theme={null}
MySQL > SELECT * FROM smallintDemo;
+-------+
| pk    |
+-------+
| 32767 |
+-------+
```


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