FND_FOREIGN_KEY_COLUMNS stores information about individual columns in foreign keys. Each row includes the foreign key it is a part of, the sequence in the foreign key, and a cascade value. You need one row for each foreign key column in each application. Oracle Applications uses this information 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
FOREIGN_KEY_ID NUMBER (15) Yes Foreign key identifier
FOREIGN_KEY_SEQUENCE NUMBER (15) Yes Sequence of the column in the foreign 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
Cascade value


cursor cur_fk_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_foreign_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.foreign_key_id = n_keyid
  order by foreign_key_sequence;