﻿CREATE TABLE [dbo].[Package2] (
    [CodPackag] NVARCHAR (50)   NOT NULL,
    [TotQta]    DECIMAL (18, 3) CONSTRAINT [DF_Package2_TotQty] DEFAULT ((0)) NOT NULL,
    [Weight]    DECIMAL (18, 6) CONSTRAINT [DF_Package2_Weight] DEFAULT ((0)) NOT NULL,
    [Tare]      DECIMAL (18, 6) CONSTRAINT [DF_Package2_Tare] DEFAULT ((0)) NOT NULL,
    [NumImb]    DECIMAL (9, 6)  CONSTRAINT [DF_Package2_NumImb] DEFAULT ((0)) NOT NULL,
    [Durata]    DECIMAL (18, 6) CONSTRAINT [DF_Package2_Durata] DEFAULT ((0)) NOT NULL,
    CONSTRAINT [PK_Package2] PRIMARY KEY CLUSTERED ([CodPackag] ASC),
    CONSTRAINT [FK_Package2_PackagDet] FOREIGN KEY ([CodPackag]) REFERENCES [dbo].[PackagDet] ([CodPackag]) ON UPDATE CASCADE
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Quantità totale lavorata', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Package2', @level2type = N'COLUMN', @level2name = N'TotQta';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Peso medio', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Package2', @level2type = N'COLUMN', @level2name = N'Weight';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Tara', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Package2', @level2type = N'COLUMN', @level2name = N'Tare';

