select constraint_type
from user_constraints
where table_name='AAA'
and constraint_type='P';注意表名要大写
P也要大写删除
alter table aaa drop primary key;
from user_constraints
where table_name='AAA'
and constraint_type='P';注意表名要大写
P也要大写删除
alter table aaa drop primary key;
all_tables/dba_tables/user_tables 表信息
all_tab_columns/dba_tab_columns/user_tab_columns 表中字段信息
all_objects/dba_objects/user_objects 所有模式对象的信息,包括创建日期约束数据字典
all_constraints/dba_constraints/user_constraints 约束的基本信息
all_cons_columns/dba/user 约束对应的字段信息索引数据字典
all_indexes/dba_indexes/user_indexes 索引的基本信息
all_ind_columns/dba_ind_columns/user_ind_columns 索引对应的字段信息
alter table dept drop unique (dname,loc) --指定约束的定义内容
alter table dept drop constraint dept_dname_loc_uk(约束名)名字 --指定约束名字