
IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'ASI_ERTELEME_SURESI' AND SYSOBJECTS.name = 'HASILAR')
ALTER TABLE HASILAR ADD ASI_ERTELEME_SURESI NVARCHAR(15) NULL

GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'ASI_YAPILMAMA_DURUMUID' AND SYSOBJECTS.name = 'HASILAR')
ALTER TABLE HASILAR ADD ASI_YAPILMAMA_DURUMUID INT NULL

GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'ASI_YAPILMAMA_NEDENIID' AND SYSOBJECTS.name = 'HASILAR')
ALTER TABLE HASILAR ADD ASI_YAPILMAMA_NEDENIID INT NULL

GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'BILDIRIMI_ZORUNLU_ASI_SONRASI_ISTENMEYEN_ETKI_NEDENIID' AND SYSOBJECTS.name = 'HASILAR')
ALTER TABLE HASILAR ADD BILDIRIMI_ZORUNLU_ASI_SONRASI_ISTENMEYEN_ETKI_NEDENIID INT NULL

GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'ASI_SONRASI_ETKILENME_TARIHI' AND SYSOBJECTS.name = 'HASILAR')
ALTER TABLE HASILAR ADD ASI_SONRASI_ETKILENME_TARIHI DATETIME NULL

GO



