How to set the primary key in the database?
SQL method of setting primary key
Open the [SQL Server Management Studio] management tool and connect to the database
[New table Set the primary key] - Open the new table interface
1) Expand the database where you want to create a new table
2) Right-click the [Table] menu and select [New]->[Table]
[Set the primary key when creating a new table] - Set the primary key
1) In the "New Table Interface", add two test column rows
2) Select any line, right-click and select [Set Primary Key]
3) Combined primary key setting: Hold down the ctrl key and use the left mouse button to select more lines, then right-click and select [Set Primary Key]
4) After adding the column, click the [Save] button, enter the "table name" in the pop-up box, and click the OK button
Recommended tutorial:sql tutorial
The above is the detailed content of How to set primary key in database. For more information, please follow other related articles on the PHP Chinese website!