IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'OGIDERODEMESI' AND SYSOBJECTS.name = 'ODEMEISL')
ALTER TABLE dbo.[ODEMEISL] ADD OGIDERODEMESI BIT null
go


IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'OGIDERDETAYID' AND SYSOBJECTS.name = 'ODEMEISL')
ALTER TABLE dbo.[ODEMEISL] ADD OGIDERDETAYID INT null
go

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'OGIDERGRUPID' AND SYSOBJECTS.name = 'ODEMEISL')
ALTER TABLE dbo.[ODEMEISL] ADD OGIDERGRUPID INT null
go

