Home  >  Article  >  Database  >  How to create foreign key constraints in phpmyadmin

How to create foreign key constraints in phpmyadmin

王林
王林Original
2019-12-28 09:43:153501browse

How to create foreign key constraints in phpmyadmin

Select the database where you want to add foreign keys

How to create foreign key constraints in phpmyadmin

Select the tables one by one (this article uses user as an example)

How to create foreign key constraints in phpmyadmin

Select [Operation]

How to create foreign key constraints in phpmyadmin

#Modify the storage engine in the table options (make sure the storage engine of the table creating the foreign key is the same)

How to create foreign key constraints in phpmyadmin

Select the table to which you want to add a foreign key

How to create foreign key constraints in phpmyadmin

Select the structure

How to create foreign key constraints in phpmyadmin

Select the associated view

How to create foreign key constraints in phpmyadmin

Add foreign key

How to create foreign key constraints in phpmyadmin

Click Save

How to create foreign key constraints in phpmyadmin

## Recommended related article tutorials:

phpmyadmin tutorial

The above is the detailed content of How to create foreign key constraints in phpmyadmin. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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