select constraint_type 
from user_constraints 
where table_name='AAA'
and constraint_type='P';注意表名要大写
P也要大写删除
alter table aaa drop primary key;

解决方案 »

  1.   

    表数据字典
    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 索引对应的字段信息
      

  2.   

    删除约束
    alter table dept drop unique (dname,loc)   --指定约束的定义内容
    alter table dept drop constraint dept_dname_loc_uk(约束名)名字  --指定约束名字
      

  3.   

    select CONSTRAINT_NAME,TABLE_NAME,constraint_type from all_constraints where table_name = 'TABLENAME' constraint_type='P';
      

  4.   

    大力可曾是以前SQLSERVER版版主的那个大力?在那边可是五星上将啊 :)