The ADD CONSTRAINT
command is used to create a constraint after a table is already created.
The following SQL adds a constraint named "PK_Person" that is a PRIMARY KEY constraint on multiple columns (ID and LastName):
ALTER TABLE Persons
ADD CONSTRAINT PK_Person PRIMARY KEY (ID,LastName);
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!