-- 删除表中的主键约束
alter table dept drop primary key;
create table dept(
depid char(3) primary key,
--创建表中的唯一约束
depname varchar(20)
uniquerpeoplecount int
-- 删除表中的唯一约束
alter table dept drop index depname;
create table example(
e_id int primary key auto increment,-- 创建表中的自动增长约束
name varchar(4),
math int default 0,
minmax float
);
- 删除表中的自动增长约束
alter table example modify e id int;
create table dept(
depid char(3) primary keyr
depname varchar(20),
peoplecount int not nul1,-- 创建表中的非空约束
);
-- 删除表中的非空约束
alter table dept modify peoplecount int;
create table dept(
depid char(3) primary keyr
depname varchar(20),
peoplecount int default 0 -- 创建表中的默认约束
);
-- 删除表中的默认约束
alter table dept modify peoplecount int;








暂无数据