if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UsciteContoDepositoNonGestite]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
/****** Object:  Table [dbo].[UsciteContoDepositoNonGestite]    Script Date: 26/11/2021 12:31:53 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON


CREATE TABLE [dbo].[UsciteContoDepositoNonGestite](
	[IDUscita] [bigint] NOT NULL,
	[IDDoc] [bigint] NOT NULL CONSTRAINT [DF_UsciteContoDepositoNonGestite_IDDocumento]  DEFAULT ((0)),
	[IDDocRiga] [bigint] NOT NULL CONSTRAINT [DF_UsciteContoDepositoNonGestite_IDDocRiga]  DEFAULT ((0)),
	[DataUscita] [datetime] NULL,
	[CopieCDep] [int] NOT NULL CONSTRAINT [DF_UsciteContoDepositoNonGestite_CopieCDep]  DEFAULT ((0)),
	[DataPresuntaFattCD] [datetime] NULL,
	[DataConsegna] [datetime] NULL,
 CONSTRAINT [PK_UsciteContoDepositoNonGestite] PRIMARY KEY CLUSTERED 
(
	[IDUscita] ASC,
	[IDDoc] ASC,
	[IDDocRiga] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

END