IF Not (EXISTS(SELECT * FROM sysobjects WHERE name='JetPrint'))
Begin
	CREATE TABLE [dbo].[JetPrint](
		[Id] [INT] IDENTITY(1,1) NOT NULL,
		[GoodsCode] [VARCHAR](20) NOT NULL,
		[StartDate] [SMALLDATETIME] NOT NULL,
		[Qty] [INT] NOT NULL,
		[SalePrice] [MONEY] NOT NULL,
		[SaleQty] [INT] NOT NULL,
		[Reservation] [INT] NULL,
		[IsActive] [BIT] NOT NULL,
	 CONSTRAINT [PK_JetPrint] PRIMARY KEY CLUSTERED 
	(
		[Id] ASC
	)
	) ON [PRIMARY]

	ALTER TABLE [dbo].[JetPrint] ADD  CONSTRAINT [DF_JetPrint_SalesQty]  DEFAULT ((0)) FOR [SaleQty]
	ALTER TABLE [dbo].[JetPrint] ADD  CONSTRAINT [DF_JetPrint_Reservation]  DEFAULT ((0)) FOR [Reservation]
	ALTER TABLE [dbo].[JetPrint] ADD  CONSTRAINT [DF_JetPrint_IsActive]  DEFAULT ((1)) FOR [IsActive]
End
