if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FAT_ELIVA]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

/****** Object:  Table [dbo].[FAT_ELIVA]    Script Date: 30/11/2018 11:30:41 ******/


CREATE TABLE [dbo].[FAT_ELIVA](
	[ditta] [int] NOT NULL CONSTRAINT [DF_FAT_ELIVA_ditta]  DEFAULT ((0)),
	[id] [bigint] NOT NULL CONSTRAINT [DF_FAT_ELIVA_id]  DEFAULT ((0)),
	[prog] [int] NOT NULL CONSTRAINT [DF_FAT_ELIVA_prog]  DEFAULT ((0)),
	[aliquotaiva] [char](10) NOT NULL CONSTRAINT [DF_FAT_ELIVA_aliquotaiva]  DEFAULT (''),
	[imponibile] [char](20) NOT NULL CONSTRAINT [DF_FAT_ELIVA_imponibile]  DEFAULT (''),
	[imposta] [char](20) NOT NULL CONSTRAINT [DF_FAT_ELIVA_imposta]  DEFAULT (''),
	[EsigibilitaIVA] [char](10) NOT NULL CONSTRAINT [DF_FAT_ELIVA_EsigibilitaIVA]  DEFAULT (''),
	[percheivazero] [char](200) NOT NULL CONSTRAINT [DF_FAT_ELIVA_percheivazero]  DEFAULT (''),
	[Natura] [char](10) NOT NULL CONSTRAINT [DF_FAT_ELIVA_Natura]  DEFAULT (''),
 CONSTRAINT [PK_FAT_ELIVA] PRIMARY KEY CLUSTERED 
(
	[ditta] ASC,
	[id] ASC,
	[prog] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]


SET ANSI_PADDING OFF
GO
