if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[NoteProdotto]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [dbo].[NoteProdotto](
	[IdNotaProdotto] [int] NOT NULL,
	[IdNota] [int] NULL,
	[IdProd] [int] NULL,
	[Attiva] [bigint] NULL,
 CONSTRAINT [PK_NoteProdotto] PRIMARY KEY CLUSTERED 
(
	[IdNotaProdotto] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO