What does tinyint (3) mean in SQLite SQL?

I understand that it tinyintis a single-byte integer (by the way, is it signed or unsigned?). What does the argument mean (3)? I searched and could not find the answer.

+5
source share
2 answers

See this blog page for MySQL column type definitions.

For numeric types, the length modifier is actually the width of the display, which has nothing to do with what can be stored in the field. Yes, that’s all - both TINYINT (1) and TINYINT (4) can store values ​​in the range -128..127 (or for unsigned values ​​0..255) and are absolutely identical data types with one small twist (as for search dates - see below). Here is an explanation of what is meant by the width of the display taken directly from the source:

, , , , , , . , , SMALLINT (3), SMALLINT -32768 32767, , , .

+3

SQLite " " . , SQL, . ( . .)

. Manifest Typing .

SQL . , . SQLite , . , , . SQLite , , . ( : INTEGER PRIMARY KEY . SQLite , .)

. SQLite 3 Affinity:

:

  • "INT", INTEGER.

  • [ ]


. : -)

+5

All Articles