Home  >  Article  >  Database  >  How to set the joint primary key in navicat

How to set the joint primary key in navicat

(*-*)浩
(*-*)浩Original
2019-08-13 11:25:4822971browse

How to set the joint primary key in navicat

Open the navicat tool, connect to the mysql server, after selecting the database, select a table, right-click and select design table (For demonstration and testing here, select a table at will That’s it) (Recommended tutorial: navicat tutorial)

How to set the joint primary key in navicat

On the design table page, you can see all the field information of the current table, we The selected student table has an id field. Currently, the table does not have a primary key field

How to set the joint primary key in navicat

As shown in the figure, Right-click on the last column and select the primary key to change This field is set as the primary key, or you can directly click the left mouse button to quickly add and cancel the primary key

How to set the joint primary key in navicat

After setting the primary key, you can see a The identification of the lock, and there is a 1 word, because a table can add primary keys to multiple fields, it is a joint primary key, so it is displayed as primary key 1, primary key 2, etc.

How to set the joint primary key in navicat ##

The above is the detailed content of How to set the joint primary key in navicat. 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