Lists of SQL Data Type

WARNING

Each SQL language have different data types. Some have more, some have less.
Make sure you read the documentation first

Basic Data Type

Data typeDescription
CHAR
CHAR(size)
Holds a fixed length string.
The fixed size is specified in parenthesis.
Can store up to 255 characters
VARCHAR
VARCHAR(size)
Holds a variable length string.
The maximum size is specified in parenthesis.
Can store up to 255 characters.
TEXT
TEXT
Holds a string with a maximum length of 65,535 characters
ENUM
ENUM(x,y,z,etc.)
Let you enter a list of possible values.
You can list up to 65,535 values in an ENUM list.
If a value is inserted that is not in the list, a blank value will be inserted.
INT
INT
DECIMAL
DECIMAL(precision, scale)
FLOAT
FLOAT(precision, scale)
DOUBLE
DOUBLE(precision, scale)
BOOLEAN
BOOLEAN
DATE
DATE
DATETIME
DATETIME

Note: The values are sorted in the order you enter them.


Reference

https://dev.mysql.com/doc/refman/8.0/en/numeric-types.htmlopen in new window