IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'HASTAANKETI' AND SYSOBJECTS.name = 'TANKET')
ALTER TABLE TANKET ADD HASTAANKETI bit NOT NULL CONSTRAINT [DF_TANKET_HASTAANKETI] DEFAULT (0)
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'PERSONELANKETI' AND SYSOBJECTS.name = 'TANKET')
ALTER TABLE TANKET ADD PERSONELANKETI bit NOT NULL CONSTRAINT [DF_TANKET_PERSONELANKETI] DEFAULT (0)
GO

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

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