IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'HSTEFATNO' AND SYSOBJECTS.name = 'HASMEDDOKUMAN')
ALTER TABLE dbo.[HASMEDDOKUMAN] ADD HSTEFATNO [nvarchar](50) NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'HSTFATURATARIHI' AND SYSOBJECTS.name = 'HASMEDDOKUMAN')
ALTER TABLE dbo.[HASMEDDOKUMAN] ADD HSTFATURATARIHI [datetime] NULL
GO