alter table [tableName]
add [fieldName] int identity(1,1)
ADD PRIMARY KEY ([fieldName])
Expamle:
alter table attachment
add id int identity(1,1)
ADD PRIMARY KEY (id)