sql server add key to table code example Example: alter table add key sql server Click to copyALTER TABLE Persons ADD CONSTRAINT PK_Person PRIMARY KEY (ID,LastName);