# 创建books7给name添加列级非空约束
create table books7(
id int(8),
name varchar(30) not null,
price float(3),
date int(4)
)
# 给已有表books8字段date添加非空约束
create table books8(
id int(8),
name varchar(30) not null,
price float(3),
date int(4)
)
alter table books8 modify date int(4) not null
#删除books8中的非空约束
alter table books8 modify date int(4) null