The first step is to open Navicat.
The second step is to 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].
Related recommendations: "Navicat for mysql graphic tutorial"
At this time, all fields of the table are listed.
The third step is to select the field as the primary key, such as the code field.
The fourth step is to click [Primary Key] under the [Object] menu. At this time, the code field becomes the primary key and is automatically set to non-empty.
The fifth step is to set the default value, comment, automatic increment, etc. of the primary key below, and then click [Save] to complete the new primary key setting.
The above is the detailed content of How to set primary key in navicat. For more information, please follow other related articles on the PHP Chinese website!