if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FAT_ELDDT]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
/****** Object:  Table [dbo].[FAT_ELDDT]    Script Date: 30/11/2018 11:30:18 ******/
CREATE TABLE [dbo].[FAT_ELDDT](
	[ditta] [int] NOT NULL CONSTRAINT [DF_FAT_ELDDT_ditta]  DEFAULT ((0)),
	[id] [bigint] NOT NULL CONSTRAINT [DF_FAT_ELDDT_id]  DEFAULT ((0)),
	[idddt] [int] NOT NULL CONSTRAINT [DF_FAT_ELDDT_idddt]  DEFAULT ((0)),
	[NumeroDDT] [char](20) NOT NULL CONSTRAINT [DF_FAT_ELDDT_NumeroDDT]  DEFAULT (''),
	[DataDDT] [char](10) NOT NULL CONSTRAINT [DF_FAT_ELDDT_DataDDT]  DEFAULT (''),
 CONSTRAINT [PK_FAT_ELDDT] PRIMARY KEY CLUSTERED 
(
	[ditta] ASC,
	[id] ASC,
	[idddt] 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