0% found this document useful (0 votes)
7 views1 page

MySQL Data Types Explained

Uploaded by

soubermld905
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

MySQL Data Types Explained

Uploaded by

soubermld905
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

MySQL Data Types Reference

1. Numeric Data Types

a. Integer Types
Type Description
TINYINT Very small integer (1 byte)
SMALLINT Small integer (2 bytes)
MEDIUMINT Medium-sized integer (3 bytes)
INT / INTEGER Standard integer (4 bytes)
BIGINT Large integer (8 bytes)

b. Floating-Point & Fixed-Point Types


Type Description
FLOAT Small floating-point number
DOUBLE / DOUBLE PRECISION Larger floating-point number
DECIMAL / NUMERIC Exact fixed-point number

2. String (Character) Data Types


Type Description
CHAR(n) Fixed-length string
VARCHAR(n) Variable-length string
TINYTEXT, TEXT, MEDIUMTEXT, Different sizes of text data
LONGTEXT
TINYBLOB, BLOB, MEDIUMBLOB, Different sizes of binary data
LONGBLOB
ENUM One value from a predefined list
SET Multiple values from a predefined list
BINARY, VARBINARY Binary versions of CHAR and VARCHAR

3. Date and Time Data Types


Type Description
DATE Date only (YYYY-MM-DD)
DATETIME Full date and time
TIMESTAMP Date and time with timezone support
TIME Time only (HH:MM:SS)
YEAR Year only (YYYY)

You might also like