﻿CREATE TABLE [dbo].[Lot]
(
	[LotNumber] VARCHAR(30) NOT NULL, 
	[BranchCode] VARCHAR(12) NOT NULL,
	[ShortItemNumber] BIGINT NOT NULL,
    [ItemNumber] VARCHAR(25) NULL, 
	[SupplierCode] BIGINT NOT NULL,
	[StatusCode] CHAR(1) NULL,
	[Memo1] VARCHAR(30) NULL,
	[Memo2] VARCHAR(30) NULL,
	[Memo3] VARCHAR(30) NULL,
    [LastUpdateDT] DATETIME NOT NULL,
	CONSTRAINT [PK_Lot] PRIMARY KEY CLUSTERED([LotNumber], [ShortItemNumber], [BranchCode])
)

GO

CREATE INDEX [IX_Lot_SupplierCode] ON [dbo].[Lot] ([SupplierCode]) INCLUDE([LotNumber])

GO