One, Character type

type
Range
Explain

Char(N) [binary]N=1~255 Characters
binary : Case resolution
Fixed lengthstd_name cahr(32) not null
VarChar(N) [binary]N=1~255 Characters
binary : Case resolution
Variable lengthstd_address varchar(256)
TinyBlob Maximum length255 Characters(2^8-1)

Blob (Binary large objects) Store binary data, And case sensitive

memo text not null
TinyText Maximum length255 Characters(2^8-1)
Blob Maximum length65535 Characters(2^16-1)
Text Maximum length65535 Characters(2^16-1)
MediumBlob Maximum length 16777215 Characters(2^24-1)
MediumText Maximum length 16777215 Characters(2^24-1)
LongBlob Maximum length4294967295 Characters (2^32-1)
LongText Maximum length4294967295 Characters (2^32-1)
Enum The maximum number of sets is65535 list(Enumeration),Enum Single election,Set checksex enum(1,0)
habby set(‘ Play video games’,' Sleep’,' Watch movie’,' Listen to the music’)
Set The maximum number of sets is64

DistinguishNull AndNot Null :Null Store empty values for allow(Null)

Two, numerical value

type
Range
Explain
for example
TinyInt[M] [UNSIGNED]-128~127
UNSIGNED : 0~255

num tinyint unsigned
SmallInt[M] [UNSIGNED]-32768~32767
UNSIGNED :0~ 65535


MediumInt[M] [UNSIGNED]-8388608~8388607
UNSIGNED :0~16777215


Int[M] [UNSIGNED]-2^31~2^31-1
UNSIGNED : 0~2^32


BigInt[M] [UNSIGNED]-2^63~2^63-1
UNSIGNED : 0~2^64


Float [(M,D)]

-3.4E+38~3.4E+38( about )

notes: M For length, D Decimal,Float 4 bytes,Double 8 bytes
Double [(M,D)]-1.79E+308~1.79E+308( about )
Decimal [(M,D)]

DistinguishZeroFill: When declaring keywordsZeroFill Auto fill0, as 000021

Three, Date time

type
Range
Explain
Date date(yyyy-mm-dd)
Time time(hh:mm:ss)
DateTime Date and time combination(yyyy-mm-dd hh:mm:ss)
TimeStampyyyymmddhhmmss
Year

Particular yearyyyy