Insert into DEPT values(10, 'ACCOUNTING', 'NEW YORK') SQL> CREATE TABLE "DEPT"ĬONSTRAINT "PK_DEPT" PRIMARY KEY ("DEPTNO")ĬONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO") Let’s check with the example of EMP and DEPT. The referenced table is called the parent table while the table with the foreign key is called the child table. Foreign key value must match a primary key value or unique key value or it is null.įoreign key constraints are called Referential integrity constraints. ![]() Foreign key values are based on data values and they are purely logical construct not physical pointers.A foreign key is a column or set of column which refers to the primary key or Unique key in the same table or another table.It is a cross-linking between the tables. How to enable the constraint What is Foreign keyįoreign key in Oracle is a way to relate multiple Tables.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |