Integer Numbers

On this page

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)

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:

CREATE TABLE test (uid INT UNSIGNED, id INT);
INSERT INTO test SELECT 4294967295, 4294967295;
INSERT INTO test SELECT -2, -2;
SELECT * FROM test;
+------------+------------+
| uid        | id         |
+------------+------------+
| 4294967295 | 2147483647 |
|          0 |         -2 |
+------------+------------+
CREATE TABLE test2 (uid TINYINT UNSIGNED, id TINYINT);
INSERT INTO test2 SELECT 255, 255;
INSERT INTO test2 SELECT -2, -2;
SELECT * FROM test2;
+------+------+
| uid  | id   |
+------+------+
|  255 |  127 |
|    0 |   -2 |
+------+------+

Last modified: June 6, 2023

Was this article helpful?

Verification instructions

Note: You must install cosign to verify the authenticity of the SingleStore file.

Use the following steps to verify the authenticity of singlestoredb-server, singlestoredb-toolbox, singlestoredb-studio, and singlestore-client SingleStore files that have been downloaded.

You may perform the following steps on any computer that can run cosign, such as the main deployment host of the cluster.

  1. (Optional) Run the following command to view the associated signature files.

    curl undefined
  2. Download the signature file from the SingleStore release server.

    • Option 1: Click the Download Signature button next to the SingleStore file.

    • Option 2: Copy and paste the following URL into the address bar of your browser and save the signature file.

    • Option 3: Run the following command to download the signature file.

      curl -O undefined
  3. After the signature file has been downloaded, run the following command to verify the authenticity of the SingleStore file.

    echo -n undefined |
    cosign verify-blob --certificate-oidc-issuer https://oidc.eks.us-east-1.amazonaws.com/id/CCDCDBA1379A5596AB5B2E46DCA385BC \
    --certificate-identity https://kubernetes.io/namespaces/freya-production/serviceaccounts/job-worker \
    --bundle undefined \
    --new-bundle-format -
    Verified OK