「Oracle入門」ALTER VIEWの使い方

2018年11月17日

1.制約の追加
主キー制約
ALTER VIEW cft ADD CONSTRAINT constraint PRIMARY KEY (columA,columB, xxx)

一意制約
ALTER VIEW cft ADD CONSTRAINT constraint UNIQUE (columA,columB, xxx)

外部キー制約
ALTER VIEW cft ADD CONSTRAINT constraint FOREIGN KEY (columA,columB, xxx) REFERENCES schema.object (columA,columB, xxx)

2.制約の変更
ALTER VIEW cft MODIFY CONSTRAINT constraint

3.制約の削除
ALTER VIEW cft DROP CONSTRAINT constraint

主キーを削除
ALTER VIEW cft DROP PRIMARY KEY

一意制約を削除
ALTER VIEW cft DROP UNIQUE (columA,columB, xxx)

Oracle

Posted by arkgame