The Foreign Keys
tab is divided into two
sections, one with a list of foreign keys and one with various
dialogs for foreign key settings.
To add a foreign key, click the + (plus) button below the foreign key list. The MySQL Query Browser prompts for a foreign key name and the new foreign key is created.
To drop a foreign key, select the foreign key and click the - (minus) button below the foreign key list.
You can modify the name of the foreign key, its ON
DELETE
, and its ON UPDATE
actions
using the dialogs provided in the Foreign Key
Settings section of the tab.
To establish a foreign key relationship, choose a table from the Ref. Table drop-down list. The columns that can be referenced as foreign keys are listed in the area below, which has two sections. To add a column (of the table you are editing) you can either double click the area below Column and then select a column from the drop-down list, or drag a column from the column editor to the Column section. To add a column (of the reference table) double click the area below Reference Column and then select a column from the drop-down list.
This is a translation of the MySQL Administrator Manual that can be found at dev.mysql.com. The original MySQL Administrator Manual is in English, and this translation is not necessarily as up to date as the English version. Даний документ є перекладом оригінальної англійської документації по MySQL Administrator яка доступна за адресою dev.mysql.com .