December 2002
Beginner
640 pages
16h 41m
English
MySQL can represent both integers (numbers with no fractional part) and floating-point numbers (those with a fractional part).
Table 5.1 shows the numeric column types.
| Type Name | Range | Storage Required |
|---|---|---|
| TINYINT | signed: -128 to 127 | |
| unsigned: 0 to 255 | 1 byte | |
| SMALLINT | signed: -32768 to 32767 | |
| unsigned: 0 to 65535 | 2 bytes | |
| MEDIUMINT | signed: -8388604 to 8388607 | |
| unsigned: 0 to 16777215 | 3 bytes | |
| INT | signed: -2147483648 to 2147483647 (-231 to 231-1) | |
| unsigned: 0 to 4294967295 (0 to 232-1) | 4 bytes | |
| BIGINT | signed: -263 to 263-1 | |
| unsigned: 0 to 264-1 | 8 bytes | |
| FLOAT | minimum non-zero: ±1.175494351E-38 | |
| maximum: ±3.402823466E+38 | 4 bytes | |
| DOUBLE | minimum non-zero: ±2.2250738585072014E-308 | |
| maximum: ±1.7976931348623157E+308 | 8 bytes ... |