IF NOT EXISTS(SELECT * FROM SYS.TABLES WHERE NAME='TDASHBOARDSUBETANIM')
CREATE TABLE [dbo].[TDASHBOARDSUBETANIM](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[KODU] [nvarchar](20) NULL,
	[UZAKSUBEADI] [nvarchar](150) NOT NULL,
	[UZAKSUBECONNSTR] [nvarchar](500) NOT NULL,
	[UZAKSUBEID] NVARCHAR(10) NOT NULL,
	[ACIKLAMA] [nvarchar](500) NULL,

	[AKTIF] [bit] NOT NULL,
 CONSTRAINT [PK_TDASHBOARDSUBETANIM] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO


IF NOT EXISTS (SELECT * FROM SYSOBJECTS
              WHERE  SYSOBJECTS.name = 'DF_TDASHBOARDSUBETANIM_AKTIF')
ALTER TABLE [dbo].[TDASHBOARDSUBETANIM] ADD  CONSTRAINT [DF_TDASHBOARDSUBETANIM_AKTIF]  DEFAULT ((1)) FOR [AKTIF]
GO