FND_PRIMARY_KEY_COLUMNS stores information about individual columns in primary and unique keys. Each row includes the primary or unique key the column is a part of and the sequence in the primary key. You need one row for each primary key column in each application. Oracle Applications uses this information for AuditTrail and when installing and upgrading the database

Name Datatype Length Mandatory Comments
APPLICATION_ID NUMBER (15) Yes Application identifier
TABLE_ID NUMBER (15) Yes Table identifier
PRIMARY_KEY_ID NUMBER (15) Yes Primary key identifier
PRIMARY_KEY_SEQUENCE NUMBER (15) Yes Sequence of the column in the primary key
COLUMN_ID NUMBER (15) Yes Column identifier
Yes Standard Who column
LAST_UPDATED_BY NUMBER (15) Yes Standard Who column
Yes Standard Who column
CREATED_BY NUMBER (15) Yes Standard Who column
LAST_UPDATE_LOGIN NUMBER (15) Yes Standard Who column


cursor cur_pk_columns(n_tabid in number
                    , n_appid in number
                    , n_keyid in number) is
  SELECT c.column_name
  from applsys.fnd_columns c
  ,    applsys.fnd_primary_key_columns k
  where k.table_id = c.table_id
  and   k.application_id = c.application_id
  and   k.column_id = c.column_id
  and   k.table_id = n_tabid
  and   k.application_id = n_appid
  and   k.primary_key_id = n_keyid
  order by primary_key_sequence;