if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[VenditeTerminale]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[VenditeTerminale]
GO

CREATE TABLE [dbo].[VenditeTerminale](
	[IDVenditaTerminale] [bigint] NOT NULL,
	[Data] [datetime] NOT NULL,
	[Ora] [char](5) NOT NULL,
	[Barcode] [char](18) NOT NULL,
	[Qta] [int] NOT NULL,
	[IDUscita] [bigint] NOT NULL,
	[Prezzo] [decimal](18, 2) NULL,
	[Titolo] [nvarchar](50) NULL
) ON [PRIMARY]
SET ANSI_PADDING ON
ALTER TABLE [dbo].[VenditeTerminale] ADD [CodProdInt] [varchar](15) NOT NULL

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[VenditeTerminale] ADD  CONSTRAINT [DF_VenditeTerminale_CodProdInt]  DEFAULT ('') FOR [CodProdInt]
GO
