唯一性约束指的是某个列在每行数据中是唯一的。
1
create table hardware
(wujin int not null primary key,
yingjian char(5) not null unique);
2
create table hardware
(wujin int not null primary key,
yingjian char(5) not null);
alter table hardware
add constraint uq_wu(自定义) unique(yingjian);