整形:tinyint,smallint,int,bigint
create table 表 (
id int,
id bigint
)
insert into 表 values(1,1)
float,double:
create table 表 (
idd float(5,2),
iddd double(5,2),
idddd float,
)
字符型:char,varchar
create table 表 (
name char(10),
name2 varchar(10)
)
insert into 表 values('a','ss')
enum:枚举
create table 表 (
id enum('a','b','c')
)
insert into 表 (id)
value ('a'),('b'),('m');
set:集合
create table 表 (
id set('a','b','c')
)
insert into 表 value ('a'),('a,b'),('a,b,c');
日期类型:datetime
create table 表 (
时间 datetime,
年 year
)
insert into 表 value (now(),now());