例如下面代码就报错,难道字段不能默认为''?
create table t11(id int default '' )Error Code : 1067
Invalid default value for 'id'
(0 ms taken)

解决方案 »

  1.   

    create table t11(id int default null ) 
    数字型字段默认值为空字符串?
      

  2.   

    1楼的,但是插入''不报错啊,不过插入'',显示的全部为0create table t11(id int  );
    insert into t11 select '';
    insert into t11 select '';select * from t11;
    ------------------------
    create table t11(id int default null ) 
    还不如不要默认值
    直接
    create table t11(id int )