![]() ![]() The values of the corresponding rows in the child table will be removed or updated repeatedly.If we want to remove or modify any row from the parent table, then we will use the CASCADE.The foreign key column values in the child table are set to NULL.The SET NULL referential option is used when we are removing or modifying any row from the parent.Still, the InnoDB and NDB tables both excluded the SET DEFAULT action.The PostgreSQL parser identifies the SET DEFAULT.Let us see the brief introduction of five different referential options one by one in the below table: Referential Options In PostgreSQL, we have five different referential options, which are as follows: It also validates that the foreign key keeps the referential integrity using both (ON DELETE and ON UPDATE) clauses between the Parent and Child tables.It is used to define the delete and update actions in the ON DELETE and ON UPDATE.The parent table parameter defines a parent table's name, followed by column names, which references the foreign key columns. ![]() And it should be written in parentheses after the FOREIGN KEY keyword.It is used to specify the column name where we are going to create a foreign key. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |