Home>Article>Database> How to set primary key in database

How to set primary key in database

藏色散人
藏色散人 Original
2020-05-12 10:45:18 26895browse

How to set primary key in database

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

How to set primary key in 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]

How to set primary key in database

[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

How to set primary key in database

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!

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