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

# TINYINT

> TINYINT 是 1 字节有符号整数，取值范围为 [-128, 127]。

## 描述

1 字节有符号整数，范围 \[-128, 127]。

## 示例

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

```sql theme={null}
CREATE TABLE tinyIntDemo (
    pk TINYINT COMMENT "range [-128, 127]",
    pd_type VARCHAR(20)
) ENGINE=OLAP
DUPLICATE KEY(pk)
DISTRIBUTED BY HASH(pk) BUCKETS 1;

INSERT INTO tinyIntDemo VALUES (127, 'Max Value');
```

```Plaintext theme={null}
MySQL > SELECT * FROM tinyIntDemo;
+------+-----------+
| pk   | pd_type   |
+------+-----------+
|  127 | Max Value |
+------+-----------+
```


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