

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

UPDATE    [TALYASETUP].[dbo].[LANGCODE] SET AKTIF=0 WHERE AKTIF IS NULL

GO

UPDATE  [TALYASETUP].[dbo].[LANGCODE] SET AKTIF=1 WHERE LANGCODE IN ('AZ','EN','TR')

GO
