Oracle Add & Drop Foreign | Unique | Primary Key (DDL SQL)
1/20/2013 12:19:00 下午
FOREIGN KEY :
ALTER TABLE
TABLE_NAME
ADD CONSTRAINT
FK_NAME
FOREIGN KEY (
COLUMN)
REFERENCES
TABLE_NAME(
COLUMN) ;
ALTER TABLE
TABLE_NAME
DROP CONSTRAINT
FK_NAME ;
UNIQUE KEY :
ALTER TABLE TABLE_NAME
ADD CONSTRAINT
UK_NAME UNIQUE (COLUMN) ;
ALTER TABLE
TABLE_NAME
DROP CONSTRAINT
UK_NAME ;
PRIMARY KEY :
ALTER TABLE TABLE_NAME
ADD CONSTRAINT
PK_NAME PRIMARY KEY (COLUMN) ;
ALTER TABLE TABLE_NAME
DROP CONSTRAINT
PK_NAME ;
0 留言