# Integer Numbers

| Data Type                                                                                                                                                                                  | Size     | Size (Not Null) | Synonyms | Min Value   | Max Value       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | --------------- | -------- | ----------- | --------------- |
| BOOL\* (see note below)                                                                                                                                                                    | 2 bytes  | 1 byte          | BOOLEAN  | -128        | 127             |
| BIT (used to store bit values; described in full[here](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-types/other-types/#UUID-0392a8c7-73f1-d1d0-6e36-f9893d4e8aa3.md)) | 9 bytes  | 8 bytes         |          |             |                 |
| TINYINT                                                                                                                                                                                    | 2 bytes  | 1 byte          |          | -128        | 127             |
| SMALLINT                                                                                                                                                                                   | 4 bytes  | 2 bytes         |          | -32768      | 32767           |
| MEDIUMINT                                                                                                                                                                                  | 4 bytes  | 3 bytes         |          | -8388608    | 8388607         |
| INT                                                                                                                                                                                        | 8 bytes  | 4 bytes         | INTEGER  | -2147483648 | 2147483647      |
| BIGINT                                                                                                                                                                                     | 12 bytes | 8 bytes         |          | -2 \*\* 63  | (2 \*\* 63) - 1 |

## Remarks

`BOOL` and `BOOLEAN` are synonymous with `TINYINT`. A value of `0` is considered `FALSE`, non-zero values are considered `TRUE`.

The format: `INT(x)` (for example, `INT(5)`) is used to specify display width and not the size of the integer. Display width is not directly used within SingleStore but may be used by some clients.

An optional `UNSIGNED` argument is allowed for `INTEGER` data types. It doubles the positive range, but cannot hold negative numbers. See the following examples:

```sql
CREATE TABLE test (uid INT UNSIGNED, id INT);
INSERT INTO test SELECT 4294967295, 4294967295;
INSERT INTO test SELECT -2, -2;
SELECT * FROM test;

```

```output

+------------+------------+
| uid        | id         |
+------------+------------+
| 4294967295 | 2147483647 |
|          0 |         -2 |
+------------+------------+

```

```sql
CREATE TABLE test2 (uid TINYINT UNSIGNED, id TINYINT);
INSERT INTO test2 SELECT 255, 255;
INSERT INTO test2 SELECT -2, -2;
SELECT * FROM test2;

```

```output

+------+------+
| uid  | id   |
+------+------+
|  255 |  127 |
|    0 |   -2 |
+------+------+
```

***

Modified at: June 6, 2023

Source: [/db/v9.1/reference/sql-reference/data-types/integer-numbers/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-types/integer-numbers/)

(An index of the documentation is available at /llms.txt)
