EMS logo

EMS SQL Manager for InterBase/Firebird

On-line Documentation

Editing foreign key definition


Foreign Key Editor allows you to select fields for the foreign key, when you add or edit a foreign key to the table with the Table Editor.

 

Foreign Key Name

Name of a constraint; the constraint name must be unique within the table.

 

Foreign Table

Select the foreign table for the key from the drop-down list of the database tables.

 

Available Fields / Included Fields

The upper Available Fields list contains the current table fields, and the upper Included Fields list contain the fields, included in the key. Two lower lists contain the fields of the selected foreign table and the fields of this table, which are included in the key. Move the fields from between the lists in the same way as it is described for primary/unique keys (see above).

 

On Delete Rule / On Update Rule

Set rules to change a foreign key whenever the referenced primary key changes.

 

The following values are available:

  • NO ACTION (default): Does not change the foreign key; may cause the primary key update to fail due to referential integrity checks;
  • CASCADE: For ON DELETE, deletes the corresponding foreign key; for ON UPDATE, updates the corresponding foreign key to the new value of the primary key;
  • SET NULL: Sets all the columns of the corresponding foreign key to NULL;
  • SET DEFAULT: Sets every column of the corresponding foreign key is set to its default value in effect when the referential integrity constraint is defined; when the default for a foreign column changes after the referential integrity constraint is defined, the change does not have an effect on the default value used in the referential integrity constraint;

 

 

See also:

Foreign Key Editor

 

 

Table Editor - Foreign Key Editor

 

 

Products Navigation

SQL Manager for IB/FB

Our Partnership Status

MySQL Gold Certified Partner
Microsoft Gold Certified Partner
Oracle Certified Partner
Borland Technology Partner
CodeGear - Where Developers Matter