CHIL-ORACLE-唯一约束(unique)

唯一约束
  要求该列唯一,允许为空,但只能出现一个空值
1
.唯一约束 ( unique ) --例如1: create table test19( id number , name varchar2(30) , address varchar2(30) , primary key(id) , unique(address) ); ---例如2: create table test20( id number primary key , name varchar2(30) , address varchar2(30) unique ); --例如3: create table test21( id number primary key , name varchar2(30) , address varchar2(30) ); --给建好的表加上唯一约束 ALTER TABLE test21 ADD unique(address);
原文地址:https://www.cnblogs.com/ChineseIntelligentLanguage/p/6513263.html