-- 刪除表中的主鍵約束
alter table dept drop primary key;
create table dept(
depid char(3) primary key,
--創(chuàng)建表中的唯一約束
depname varchar(20)
uniquerpeoplecount int
-- 刪除表中的唯一約束
alter table dept drop index depname;
create table example(
e_id int primary key auto increment,-- 創(chuàng)建表中的自動(dòng)增長(zhǎng)約束
name varchar(4),
math int default 0,
minmax float
);
- 刪除表中的自動(dòng)增長(zhǎng)約束
alter table example modify e id int;
create table dept(
depid char(3) primary keyr
depname varchar(20),
peoplecount int not nul1,-- 創(chuàng)建表中的非空約束
);
-- 刪除表中的非空約束
alter table dept modify peoplecount int;
create table dept(
depid char(3) primary keyr
depname varchar(20),
peoplecount int default 0 -- 創(chuàng)建表中的默認(rèn)約束
);
-- 刪除表中的默認(rèn)約束
alter table dept modify peoplecount int;








暫無(wú)數(shù)據(jù)