Declare @Id Int                               
Select @Id = Id From sysobjects Where Name = 'tbl_DParvande'
if not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'Refer_Day')
Alter Table tbl_DParvande Add Refer_Day smallint
                             
Select @Id = Id From sysobjects Where Name = 'KalaId'
if not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'Parvande_Flag')
Alter Table KalaId Add Parvande_Flag  Bit

Select @Id = Id From sysobjects Where Name = 'tmpDrugHavaleh'
if not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'Refer_Day')
Alter Table tmpDrugHavaleh Add Refer_Day smallint