This Oracle tutorial explains how to enable a foreign key in Oracle with syntax and examples.
You may encounter a foreign key in Oracle that has been disabled. You can enable the foreign key using the ALTER TABLE statement.
The syntax for enabling a foreign key in Oracle/PLSQL is:
If you had created a foreign key as follows:
In this example, we've created a primary key on the supplier table called supplier_pk. It consists of only one field - the supplier_id field. Then we've created a foreign key called fk_supplier on the products table that references the supplier table based on the supplier_id field.
If the foreign key had been disabled and we wanted to enable it, we could execute the following command: