IF not EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ContractItem' AND COLUMN_NAME = 'Dom_ID_Service') begin alter table ContractItem add Dom_ID_Service int references domain (id) not null end