Open the design interface of the created table, as shown in the figure:
Click on the foreign key to display the foreign key setting interface, such as Picture:
Related recommendations: "Navicat for mysql graphic tutorial"
Customize the name, click on the field to display Field small window, which displays the fields of the table, as shown in the figure:
Click the reference database to display the drop-down box list. What is displayed here is the database configured in Navicat. Connection, as shown in the figure:
Click the reference table to display the reference table list. What is displayed here is the table in the corresponding parameter database, as shown in the figure:
Click the reference field to display the reference field small window, which is the field of the reference table, as shown in the figure:
Delete and update under settings Click Save to complete the foreign key creation, as shown in the figure:
The above is the detailed content of How to add foreign keys in navicat. For more information, please follow other related articles on the PHP Chinese website!