CREATE TABLE [dbo].[ProductDetectionDetail] (
    [AutoID]              INT           IDENTITY (1, 1) NOT NULL,
    [DetectionID]         INT           NULL,
    [ProductNo]           VARCHAR (20)  NULL,
    [ProductHeight]       FLOAT (53)    NULL,
    [ProductCellHeight]   FLOAT (53)    NULL,
    [ProductHeightStatus] VARCHAR (10)  NULL,
    [ProductLength]       FLOAT (53)    NULL,
    [ProductWidth]        FLOAT (53)    NULL,
    [ProductCellWidth]    FLOAT (53)    NULL,
    [ProductSizeStatus]   VARCHAR (10)  NULL,
    [DetectTime]          DATETIME      NULL,
    [PlateID]             INT           NULL,
    [ImageFileName]       VARCHAR (500) NULL,
    [UploadFlag]          INT           NULL,
    CONSTRAINT [PK_ProductDetectionDetail] PRIMARY KEY CLUSTERED ([AutoID] ASC)
);

ALTER TABLE [ProductDetectionDetail] ADD ProductNoStatus VARCHAR (10)  NULL;
ALTER TABLE [ProductDetectionDetail] ADD ProductCellHeightStatus VARCHAR (10)  NULL;

ALTER TABLE [ProductDetectionDetail] ADD ProductLengthStatus VARCHAR (10)  NULL;
ALTER TABLE [ProductDetectionDetail] ADD ProductWidthStatus VARCHAR (10)  NULL;

ALTER TABLE [ProductDetectionDetail] ADD ProductStatus VARCHAR (10)  NULL;
ALTER TABLE [ProductDetectionDetail] ADD CarrierBarcode VARCHAR (30)  NULL;

ALTER TABLE [ProductDetectionDetail] ADD ProductType INT  NULL;

ALTER TABLE [ProductDetectionDetail] ADD IsSample INT  NULL Default 0;