IF not EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'People' AND COLUMN_NAME = 'Pro_ID_VahedMali') begin alter table People add Pro_ID_VahedMali int references OtherProperties(ID) null end go IF not EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'kala' AND COLUMN_NAME = 'Pro_ID_VahedMali') begin alter table kala add Pro_ID_VahedMali int references OtherProperties(ID) null end