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);
复制代码

 

posted @   CHIL  阅读(247)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示