Home > Database > navicat > body text

How to set foreign keys in navicat

爱喝马黛茶的安东尼
Release: 2019-08-12 16:45:12
Original
18889 people have browsed it

How to set foreign keys in navicat

Open Navicat.

How to set foreign keys in navicat

Open the database where the data table is located, right-click the database table where you want to add fields, and then click [Design Table].

How to set foreign keys in navicat

Now enter the table design interface.

How to set foreign keys in navicat

Related recommendations: "Navicat for mysql graphic tutorial"

Click the [Foreign Key] tab and enter the foreign key Name, such as product id.

How to set foreign keys in navicat

# In the field selection dialog box, select the field to create a foreign key, such as the productid field, and then click [OK].

How to set foreign keys in navicat

Select a reference database, such as sparrow.

How to set foreign keys in navicat

Select a reference table, such as product.

How to set foreign keys in navicat

Select the reference field, such as product_id.

How to set foreign keys in navicat

Set the operation when foreign key is deleted, such as set null.

How to set foreign keys in navicat

#Set the operation when updating the foreign key, such as restrict, and then click [Save] to create the foreign key.

How to set foreign keys in navicat

The above is the detailed content of How to set foreign keys in navicat. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!