IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ARIZATAKIP]') AND type in (N'U'))
BEGIN

CREATE TABLE [dbo].[ARIZATAKIP](
	[ID] [int] NULL,
	[TALEPTARIHI] [datetime] NULL,
	[TALEPACIKLAMA] [nvarchar](500) NULL,
	[TALEPKULLANICI] [nvarchar](20) NULL,
	[COZUMTARIHI] [datetime] NULL,
	[COZUMACIKLAMA] [nvarchar](500) NULL,
	[COZUMKULLANICI] [nvarchar](20) NULL,
	[DURUMU] [nvarchar](20) NULL,
	[TALEPTURU] [nvarchar](20) NULL
) ON [PRIMARY]
END
GO


IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ARIZATAKIP]') AND 
name = N'IX_ARIZATAKIP_DURUMU')

CREATE NONCLUSTERED INDEX [IX_ARIZATAKIP_DURUMU] ON [dbo].[ARIZATAKIP] 
(
	[DURUMU] ASC,
	[ID] DESC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 80) ON [PRIMARY]
GO




