IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'HEDEF' AND SYSOBJECTS.name = 'PEGITIM')
ALTER TABLE PEGITIM ADD HEDEF nvarchar(1000) NULL
GO

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

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'KATILACAKLAR' AND SYSOBJECTS.name = 'PEGITIM')
ALTER TABLE PEGITIM ADD KATILACAKLAR nvarchar(500) NULL
GO

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

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'GRKMALZEME' AND SYSOBJECTS.name = 'PEGITIM')
ALTER TABLE PEGITIM ADD GRKMALZEME nvarchar(100) NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'DEGERLENDIRMEYONTEMI' AND SYSOBJECTS.name = 'PEGITIM')
ALTER TABLE PEGITIM ADD DEGERLENDIRMEYONTEMI nvarchar(100) NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'ACIKLAMA' AND SYSOBJECTS.name = 'PEGITIM')
ALTER TABLE PEGITIM ADD ACIKLAMA nvarchar(200) NULL
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'SONUC' AND SYSOBJECTS.name = 'PEGITIM')
ALTER TABLE PEGITIM ADD SONUC integer
GO