IF not EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Bargeh' AND COLUMN_NAME = 'Pro_ID') begin alter table dbo.Bargeh add Pro_ID int references dbo.OtherProperties(ID) null end