Oracle 約束的相關操作

 
15.
	alter table mytable add primary key(col[,df[,..]])
	alter table mytable add constraint constraint_name primary key(col)
	alter table mytable disable primary key
	alter table mytable constraint 原主鍵名 to 新
16.alter table t1 add constraint fk_t1_t2 foreign key (cid) references t2(cid);
17.alter table emp add constraint fk_a foreign (empno) references dept(deptno) on delete cascade
18 alter table emp rename constraint fk1 to fk2
19.alter table tablea disabled constraint fk_1;
20.--關閉數據完整性交驗
  alter table purchase enable novalidate constraint fk
21.alter table tableA drop constraint my_pk 刪除約束
22.alter table add constraint name unique(col1,col2);
23.alter table mytable add constraint cons_name check(col<col1)
34.alter table mytable modify st default 'AC';\
35 alter table mytable modify(col1 not null)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章