Create a MySQL Workbench Database Link

I am trying to create a foreign key between tables using MySQL Workbench. But I don’t know why I can’t check the box to select a field to map to another field in another table. Maybe this requires that both fields have the same type (and different conditions?) So, can you tell me the criteria for creating relationships using a foreign key and how to do it in MySQL Workbench?

+3
source share
5 answers

I am not a MySQL Workbench user, but make sure you use a storage engine that primarily supports foreign keys. (e.g. InnoDB)

. MySQL , .

+2

. , , , , . unsigned int int , . , - , .

+7

. :

, , " next", .

sql script . : fk. "". script. , , .

+1

EER " ". . (Workbench 5.2.36)

0

I have a problem with MySql Workbench. I have one char (5) (in table 1) as my primary key, and another char (5) (in table 2) as a foreign key. But MySql Workbench will not let me create relationships. I am using INNODB.

0
source

Source: https://habr.com/ru/post/1732048/


All Articles