PK삭제

ALTER TABLE [table_name] DROP CONSTRAINT [pk_name] CASCADE;

DROP INDEX [pk_name];

ALTER TABLE [table_name] DROP PRIMARY KEY;

 

PK생성

ALTER TABLE [table_name] ADD CONSTRAINT [pk_name] PRIMARY KEY([컬럼1],[컬럼2],....);

'개발관련 > 디비' 카테고리의 다른 글

SQL Commands  (0) 2017.09.26
exp, imp  (0) 2017.09.19
Oracle Job  (0) 2017.04.12