if not exists(select id from sysobjects where name Like '%BomProduct%'
  and xtype='PK')
begin
Alter Table BomProduct Alter Column ProdNr nVarChar(30) not Null
Go
Alter Table BomProduct Alter Column ProdNr SeriesNr(3) not Null
Go
Alter Table BomProduct Add PRIMARY Key (ProdNr,SeriesNr)
Go
end
