How to add Foreign key in Oracle?

What is Foreign Key?

Foreign key means value copy from one table to another table. If one table have primary key then we can use that table column in another table as a foreign key. The table that have primary key is called master table and the table that is using this column is called child table.

Foreign key at the stage of table creation:
CREATE TABLE GRN_MASTER
(
GRN_NUM       NUMBER,
GRN_DATE      DATE,
SUPPLIER_ID   NUMBER,
GATE_PASSS_ID NUMBER,
STORE_ID      NUMBER,
APPROVED_ID   NUMBER,
CONSTRAINTS PK_GRN_NUM PRIMARY KEY (GRN_NUM)
);

CREATE TABLE GRN_DETAIL
(
GRN_NUM       NUMBER,
SR_NUM        NUMBER,
ITEM_CODE     NUMBER,
ITEM_UOM      NUMBER,
ITEM_RATE     NUMBER,
ITEM_VALUE    NUMBER,
CONSTRAINT FK_GRN_NUM_DTL FOREIGN KEY GRN_NUM) REFERENCES GRN_MASTER(GRN_NUM)
);
Foreign key at the by using alter table:
ALTER TABLE GRN_DETAIL
ADD CONSTRAINTS FK_GRN_NUM_DTL FOREIGN KEY(GRN_NUM)REFERENCES GRN_MASTER(GRN_NUM);
Drop a Foreign key:
ALTER TABLE GRN_DETAIL
DROP  CONSTRAINTS FK_GRN_NUM_DTL;

Disabled a Foreign key
ALTER TABLE GRN_DETAIL
DISABLE CONSTRAINT FK_GRN_NUM_DTL;

Enabled a Foreign key:
ALTER TABLE GRN_DETAIL
ENABLE CONSTRAINT FK_GRN_NUM_DTL;