

Referenced key in parent table must either be a Primary Key or a Unique Key.A composite foreign key cannot have more than 32 columns.However, the primary key can contain a column of TIMESTAMP WITH LOCAL TIME ZONE. None of the columns in the foreign key can be of LOB, LONG, LONG RAW, VARRAY, NESTED TABLE, BFILE, REF, TIMESTAMP WITH TIME ZONE, or user-defined type.Instead, you must create the table without the constraint and then add it later with an ALTER TABLE statement. You cannot define a foreign key constraint in a CREATE TABLE statement that contains an AS sub query clause.There are a few things which you should know about the foreign key (Features of Foreign Key): While the constraint which involves more than one column in foreign key in the child table as well as more than one column in reference key in the parent table is called Composite Foreign Key. What Are Simple & Composite Foreign Key Constraints?Ĭonstraint which involves only one column in foreign key in child table and one column in reference key in parent table is called Simple Foreign Key. Similar to primary key constraint Foreign Key constraint is also of two types:
