Declare @Id Int                               
Select @Id = Id From sysobjects Where Name = 'Sahmiyeh'
if not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'Hix_Code')
  Alter Table dbo.Sahmiyeh Add  Hix_Code Smallint  NULL

Select @Id = Id From sysobjects Where Name = 'Grade'
if not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'Hix_Code')
  Alter Table dbo.Grade Add  Hix_Code int  NULL
