DT11 - Principaux types de données MySQL/MariaDB
Data Type Storage Description
Size
(bytes)
String Data Types
CHAR(s) s A FIXED length string (can contain letters, numbers, and special
characters). The s parameter specifies the column length in
characters - can be from 0 to 255. Default is 1
VARCHAR(s) s+1 A VARIABLE length string (can contain letters, numbers, and
special characters). The s parameter specifies the maximum
column length in characters - can be from 0 to 65535
TEXT String Holds a string with a maximum length of 65,535 bytes
length +2
Numeric Data Types
TINYINT 1 A very small integer. Signed range is from -128 to 127. Unsigned
range is from 0 to 255.
SMALLINT 2 A small integer. Signed range is from -32768 to 32767. Unsigned
range is from 0 to 65535.
INT 4 A medium integer. Signed range is from -2147483648 to
2147483647. Unsigned range is from 0 to 4294967295.
BIGINT 8 A large integer. Signed range is from - 9223372036854775808 to
9223372036854775807. Unsigned range is from 0 to
18446744073709551615.
FLOAT 4 A floating point number
DOUBLE 8 A normal-size floating point number
Date and Time Data Types
DATETIME 8 A date and time combination. Format: YYYY-MM-DD hh:mm:ss.
The supported range is from '1000-01-01 00:00:00' to '9999-12-
31 23:59:59
TIMESTAMP 4 A timestamp. TIMESTAMP values are stored as the number of
seconds since the Unix epoch ('1970-01-01 00:00:00' UTC).
Format: YYYY-MM-DD hh:mm:ss. The supported range is from
'1970-01-01 00:00:01' UTC to '2038-01-09 03:14:07' UTC
CYBERSÉCURITÉ, INFORMATIQUE ET RÉSEAUX, ÉLECTRONIQUE
OPTION INFORMATIQUE ET RÉSEAUX Session 2025
Étude et conception de réseaux informatiques – E4 Code : 25CIELAECRI Page DOC14 sur 28