//不允許為null alter table table1 change id id int(10) not null; //允許為null alter table table1 change id id int(10) null;
//name_new允許為空 insert table1(id,transactor) values(1,"world"); //transactor不允許為null mysql> insert table1(id) values(1); ERROR 1364 (HY000): Field 'transactor' doesn't have a default value
