MySQL database: data types and comments

Note

/* 多行注释 */
# 单行注释
-- 单行注释(注意:两个但横线后面必须加空格)

type of data

1. Plastic

tinyint, smallint, mediumint, int, bigint
small integer large integer large integer large integer greatly integer

2. Float

​ float、double

3. decimal type

decimal (common: to ensure that data is not lost)
as: 100.32 ----- "decimal (5,2)

4. Character

1.char
2.varchar
3.text
4.blob
5.enum enumeration (one of many)
6.set (multiple choice and more)

5. Date and Time

1.year
2. DATE
3.time
4.datetime (not 5.5)
5.timestamp timestamp

A null value may be used as the = assignment as a condition for determination is null

Non-empty is not null condition is determined non-empty

Guess you like

Origin www.cnblogs.com/yanlzy/p/11908988.html