IF not EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'PrescriptionFormula' AND COLUMN_NAME = 'Dom_ID_RowType') begin alter table dbo.PrescriptionFormula add Dom_ID_RowType int references domain(ID) not null default -1 end;