首先要说明的是:你用了Not Null后,
你的Enum('1','2') 允许有三个值: 空,'1','2'insert into test values(3,'test');
却仍可插入,其值为(空,'test')
insert into test set name = 'test';
其值为('1','test')
》》》》》》》》》》》》》》》》》》》》》》》
如不用Not Null
你的Enum('1','2') 允许有四个值: Null,空,'1','2'
insert into test values(3,'test');
却仍可插入,其值为(空,'test')
insert into test set name = 'test';
其值为(Null,'test')
呵呵,
如你要求的
还真不知该怎么办呢
你的Enum('1','2') 允许有三个值: 空,'1','2'insert into test values(3,'test');
却仍可插入,其值为(空,'test')
insert into test set name = 'test';
其值为('1','test')
》》》》》》》》》》》》》》》》》》》》》》》
如不用Not Null
你的Enum('1','2') 允许有四个值: Null,空,'1','2'
insert into test values(3,'test');
却仍可插入,其值为(空,'test')
insert into test set name = 'test';
其值为(Null,'test')
呵呵,
如你要求的
还真不知该怎么办呢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货