The ADD CONSTRAINT command is used to add a constraint to an already existing table.
The SQL statement below adds a constraint named “PK_Person” that acts as a PRIMARY KEY constraint on multiple columns (ID and LastName).
ALTER TABLE Persons ADD CONSTRAINT PK_Person PRIMARY KEY (ID,LastName); |