0% found this document useful (0 votes)
2 views3 pages

MySQL Datatypes

MySQL data types define the kind of data that can be stored in a column, categorized into String, Numeric, Date and time, and Binary types. String datatypes include fixed-length and variable-length strings, with specific types like CHAR, VARCHAR, ENUM, SET, and various TEXT types, each having different size limits. Fixed-length strings are manipulated faster than variable-length strings.

Uploaded by

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

MySQL Datatypes

MySQL data types define the kind of data that can be stored in a column, categorized into String, Numeric, Date and time, and Binary types. String datatypes include fixed-length and variable-length strings, with specific types like CHAR, VARCHAR, ENUM, SET, and various TEXT types, each having different size limits. Fixed-length strings are manipulated faster than variable-length strings.

Uploaded by

jeba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

MySQL data types

• datatypes are rules that define what data may be


stored in a column and how that data is actually
stored.
• Major MySQL datatypes are
▫ String
▫ Numeric
▫ Date and time
▫ Binary
String Datatypes

• Fixed-length strings :
▫ fixed number of characters.
• variable-length strings:
▫ text of variable length

• manipulate fixed length faster than variable


length.
String datatypes
Datatype Description
Char Fixed-length string from 1- 255 Chars long. size must be
specified at create time.

VARCHAR same as Char but the size is maximum.


Enum Accepts one of a predefined set of upto 64K strings.
SET Accepts zero or more of a predefined set of upto 64K strings.
TEXT variable length string with the maximum size of 64 K
MEDIUMTEXT TEXT with maximum size of 16K
TINYTEXT TEXT with maximum size of 255 BYTES
LONGTEXT TEXT with maximum size of 4GB

You might also like