how to add primary key using alter table in sql server code example
Example 1: add primary key to existing table sql
alter table Persion add primary key (persionId,Pname,PMID)
Example 2: add primary key to database sql
CREATE TABLE Persons (
ID int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int,
PRIMARY KEY (ID)
);