IF not EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'KalaDarAnbar' AND COLUMN_NAME = 'Dom_ID_RowType') begin alter table KalaDarAnbar add Dom_ID_RowType int references domain(ID) not null default 784 end go IF not EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'KalaDarAnbar' AND COLUMN_NAME = 'Dom_ID_RestorationCode') begin alter table KalaDarAnbar add Dom_ID_RestorationCode int references domain(ID) not null default 788 end