Search notes:

Oracle: Foreign key constraint

A foreign key constraint is also (and possibly more correctly) referred to as «referential integrity constraint», and consequently shows up in the column constraint_type (data dictionary view all_constraint) as R.

Extracting foreign key creation statements with DBMS_METADATA

The following statements use dbms_metadata.get_ddl to extract statements that create foreign keys:
begin
   dbms_metadata.set_transform_param (dbms_metadata.session_transform, 'SQLTERMINATOR', true);
   dbms_metadata.set_transform_param (dbms_metadata.session_transform, 'PRETTY'       , true);
end;
/

select
   dbms_metadata.get_ddl ('REF_CONSTRAINT', cfk.constraint_name, cfk.owner)
from
   all_constraints cfk  join
   all_constraints cpk  on cfk.r_owner           = cpk.owner             and
                           cfk.r_constraint_name = cpk.constraint_name
where
   cfk.owner           = 'TABLE_OWNER'   and
   cpk.table_name      = 'SOME_TABLE'    and
   cpk.constraint_type IN ('P','U')      and
   cfk.constraint_type = 'R'
;

See also

Primary keys
referential integrity
A SQL statement to recursively query referential integrity dependencies.
Using all_constraints to find primary-foreign key relationships.
The error messages
Using dbms_metadata.get_dependent_ddl to obtain foreign keys as alter table statements.
When creating a foreign key constraint, a synonym can be used for the referenced table.
Referential integrity from a foreign key to a unique constraint

Index