A foreign key is utilized to link two tables together. It is a field in one chart that refers to the PRIMARY KEY in an additional table.
• It is utilized to prevent actions that would obliterate links between tables.
• You may need to create foreign key constraints, but you may not be certain of how you will do that.
• The main table should have a primary key column with a distinctive constraint.
• Create a row that will be used to reference a non -existent primary key.
• Make table EMP (empno NUMBER 4), ename VARCHAR2 (35) deptno NUMBER (7,2). NOT NULL CONSTRAINT em_deptro_fk REFERENCES dept (deptno) FOREIGN KEY constraint on the DEPTNO column of the EMP table.