![]() Set the referencing column(s) to their default values. This is the default action.ĭelete any rows referencing the deleted row, or update the value of the referencing column to the new value of the referenced column, respectively. SQL FOREIGN KEY Constraint SQL FOREIGN KEY on CREATE TABLE SQL FOREIGN KEY on ALTER TABLE DROP a FOREIGN KEY Constraint Report Error Thank You For Helping. If the constraint is deferred, this error will be produced at constraint check time if there still exist any referencing rows. Produce an error indicating that the deletion or update would create a foreign key constraint violation. This is the same as NO ACTION except that the check is not deferrable. The On Delete and On Update drop-down list define the type of the actions to be taken. If you omit it, PostgreSQL will assign an auto-generated name. To include field(s)/referenced field(s) to the key, just simply double-click the Fields/ Referenced Fields field or click to open the editor(s) for editing. Syntax: FOREIGN KEY (column) REFERENCES parenttable (tablename) Let’s analyze the above syntax: First, specify the name for the foreign key constraint after the CONSTRAINT keyword. ![]() ![]() Use the Referenced Schema and Referenced Table drop-down lists to select a foreign schema and table respectively. Use the Name edit box to enter a name for the new key.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |