一:sql语句1.增加主键alter table TABLE_NAME add constraint KEY_NAME primary key (TABLE_COLUMN);指定表空间alter table TABLE_NAME add constraint KEY_NAME primary key (TABLE_COLUMN) using index tablespace TABLE_SPACE_NAME;2.增加外键alter table TABLE_NAME add constraint FK_NAME foreign key (TABLE_COLUMN) references KEY_TABLE_NAME;3.使主键或外键失效、生效alter table TABLE_NAME disable(enable) constraint KEY_NAME;4、查看各种约束select constraint_name,table_name,constraint_type,status from user_constraints;select