Main Tables Views Materialized Views Indexes Constraints Triggers Procedures Functions Packages Sequences Java Sources Jobs Sanity Check Index DDL scrips
Description Columns Query Constraints Triggers

ALL_PRIMARY_KEYS

DDL script

Columns

NameTypeNullableInsertableUpdatableDeletableComment
TABLE_NAMEVARCHAR2(30)NNONONO 
CONSTRAINT_NAMEVARCHAR2(30)NNONONO 
COLUMN_NAMEVARCHAR2(4000)YNONONO 

Query:

Legend: comment string keyword reserved word operator
select
       ac.table_name,
       ac.constraint_name,
       acc.column_name
  from all_constraints ac
  join all_cons_columns acc
    on ac.constraint_name = acc.constraint_name
   and ac.owner = acc.owner
 where ac.constraint_type = 'P'