﻿CREATE TABLE [dbo].[AnagCausali] (
    [idxCausale]     INT           IDENTITY (1, 1) NOT NULL,
    [idxFamMacchine] INT           NOT NULL,
    [descrCausale]   NVARCHAR (50) NULL,
    [attiva]         BIT           CONSTRAINT [DF_AnagCausali_attiva] DEFAULT ((1)) NULL,
    CONSTRAINT [PK_AnagCausali] PRIMARY KEY CLUSTERED ([idxCausale] ASC),
    CONSTRAINT [FK_AnagCausali_AnagFamMacchine] FOREIGN KEY ([idxFamMacchine]) REFERENCES [dbo].[AnagFamMacchine] ([idxFamMacchine]) ON UPDATE CASCADE
);

