MariaDB Data Types
Objectives
-
Understanding of MariaDB Data Types
-
MariaDB Data Types List and Description
Understanding of MariaDB Data Types
MariaDB Data Types List and Description
Name | Type | Description |
---|---|---|
VARCHAR(size) | String | A VARIABLE length string (can contain letters, numbers, and special characters). Size can be from 0 to 65535 |
TEXT(size) | String | Holds a string with a maximum length of 65,535 bytes |
LONGTEXT | String | Holds a string with a maximum length of 4,294,967,295 characters |
ENUM(val1, val2, val3, …) | Set of String | A string object that can have only one value, chosen from a list of possible values. It can list up to 65535 values in an ENUM list. |
FLOAT(p) | Number | A floating point number. p can be 0 to 53 |
INT(size) | Number | A medium integer. Signed range is from -2147483648 to 2147483647. |
TINYINT(size) | Number | A very small integer. Signed range is from -128 to 127.Size can be from 0 to 255. |
BIGINT(size) | Number | A large integer. Signed range is from -9223372036854775808 to 9223372036854775807. |
BIT(size) | Number | A bit-value type. Size can be from 1 to 64. |
DOUBLE(size, d) | Number | A normal-size floating point number. The total number of digits is specified in size. The decimal point is specified in the d parameter |
DATE | Date only | A date. Format: YYYY-MM-DD. The supported range is from '1000-01-01' to '9999-12-31' |
DATETIME(fsp) | Date and time | A date and time combination. Format: YYYY-MM-DD hh:mm:ss. |
TIMESTAMP(fsp) | timestamp | A timestamp. TIMESTAMP values are stored as the number of seconds since the Unix epoch. |
TIME(fsp) | Time only | A time. Format: hh:mm:ss. |
YEAR | Year | A year in four-digit format. Values allowed in four-digit format: 1901 to 2155, and 0000. |