IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[ITS]') AND name = N'IX_ITS_GTIN_SN')
BEGIN
CREATE UNIQUE NONCLUSTERED INDEX [IX_ITS_GTIN_SN] ON [dbo].[ITS]
(
	[GTIN] ASC,
	[SN] ASC,
	[SUBEID] ASC
)
INCLUDE ( 	[ITSID],
	[KAREKODU],
	[XD],
	[BN],
	[FATISLID],
	[ABILDIRIMID],
	[FBILDIRIMID],
	[FFATISLID],
	[DBILDIRIMID],
	[DDEPOFISISLID],
	[DTDEPOFISISLID],
	[KTARIHI],
	[USERID],
	[FATID],
	[DEPOFISID],
	[ATARIH],
	[STARIH],
	[ITARIH],
	[TEMPFATISLID],
	[TEMPDFISLID],
	[TEMPTFISLID],
	[TEMPIADEFATISLID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = ON, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
END