MySQL Data Types
Technology 34 records updated 2026-07-17
MySQL Data Types, with data type, and description.
Get this data
GET https://mysafeinfo.com/api/data/mysqldatatypes
Sort, page, randomize, and download with query parameters; see the documentation.
Try it live
Run a request against mysqldatatypes straight from your browser. Add your API key
to lift the row cap and return every record. The call goes to the API and nothing is stored here.
Preview
First 25 of 34 records. Click a column to sort these rows.
| ID | DataType | Description |
|---|---|---|
| 1 | CHAR(size) | A FIXED length string (can contain letters, numbers, and special characters). The size parameter specifies the column length in characters - can be from 0 to 255. Default is 1 |
| 2 | VARCHAR(size) | A VARIABLE length string (can contain letters, numbers, and special characters). The size parameter specifies the maximum column length in characters - can be from 0 to 65535 |
| 3 | BINARY(size) | Equal to CHAR(), but stores binary byte strings. The size parameter specifies the column length in bytes. Default is 1 |
| 4 | VARBINARY(size) | Equal to VARCHAR(), but stores binary byte strings. The size parameter specifies the maximum column length in bytes. |
| 5 | TINYBLOB | For BLOBs (Binary Large OBjects). Max length: 255 bytes |
| 6 | TINYTEXT | Holds a string with a maximum length of 255 characters |
| 7 | TEXT(size) | Holds a string with a maximum length of 65,535 bytes |
| 8 | BLOB(size) | For BLOBs (Binary Large OBjects). Holds up to 65,535 bytes of data |
| 9 | MEDIUMTEXT | Holds a string with a maximum length of 16,777,215 characters |
| 10 | MEDIUMBLOB | For BLOBs (Binary Large OBjects). Holds up to 16,777,215 bytes of data |
| 11 | LONGTEXT | Holds a string with a maximum length of 4,294,967,295 characters |
| 12 | LONGBLOB | For BLOBs (Binary Large OBjects). Holds up to 4,294,967,295 bytes of data |
| 13 | ENUM(val1, val2, val3, ...) | A string object that can have only one value, chosen from a list of possible values. You can list up to 65535 values in an ENUM list. If a value is inserted that is not in the list, a blank value will be inserted. The values are sorted in the order you enter them |
| 14 | SET(val1, val2, val3, ...) | A string object that can have 0 or more values, chosen from a list of possible values. You can list up to 64 values in a SET list |
| 15 | BIT(size) | A bit-value type. The number of bits per value is specified in size. The size parameter can hold a value from 1 to 64. The default value for size is 1. |
| 16 | TINYINT(size) | A very small integer. Signed range is from -128 to 127. Unsigned range is from 0 to 255. The size parameter specifies the maximum display width (which is 255) |
| 17 | BOOL | Zero is considered as false, nonzero values are considered as true. |
| 18 | BOOLEAN | Equal to BOOL |
| 19 | SMALLINT(size) | A small integer. Signed range is from -32768 to 32767. Unsigned range is from 0 to 65535. The size parameter specifies the maximum display width (which is 255) |
| 20 | MEDIUMINT(size) | A medium integer. Signed range is from -8388608 to 8388607. Unsigned range is from 0 to 16777215. The size parameter specifies the maximum display width (which is 255) |
| 21 | INT(size) | A medium integer. Signed range is from -2147483648 to 2147483647. Unsigned range is from 0 to 4294967295. The size parameter specifies the maximum display width (which is 255) |
| 22 | INTEGER(size) | Equal to INT(size) |
| 23 | BIGINT(size) | A large integer. Signed range is from -9223372036854775808 to 9223372036854775807. Unsigned range is from 0 to 18446744073709551615. The size parameter specifies the maximum display width (which is 255) |
| 24 | FLOAT(size, d) | A floating point number. The total number of digits is specified in size. The number of digits after the decimal point is specified in the d parameter. This syntax is deprecated in MySQL 8.0.17, and it will be removed in future MySQL versions |
| 25 | FLOAT(p) | A floating point number. MySQL uses the p value to determine whether to use FLOAT or DOUBLE for the resulting data type. If p is from 0 to 24, the data type becomes FLOAT(). If p is from 25 to 53, the data type becomes DOUBLE() |
Notes
- Last updated on July 17, 2026.