﻿CREATE TABLE [dbo].[TabDifett] (
    [KeyAMI]     NVARCHAR (152) NOT NULL,
    [ProcessNum] NVARCHAR (50)  NOT NULL,
    [CodItem]    NVARCHAR (50)  NOT NULL,
    [RawMat]     NVARCHAR (50)  NOT NULL,
    [CodPlant]   NVARCHAR (50)  NOT NULL,
    [TotOUT]     INT            NULL,
    [TotIn]      INT            NULL
);


GO
CREATE CLUSTERED INDEX [i_TabDifett_ProcessNum_KeyAMI]
    ON [dbo].[TabDifett]([ProcessNum] ASC, [KeyAMI] ASC);


GO
CREATE NONCLUSTERED INDEX [i_TabDifett_KeyAMI_ProcessNum]
    ON [dbo].[TabDifett]([KeyAMI] ASC, [ProcessNum] ASC)
    INCLUDE([TotOUT], [TotIn]);

