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

CREATE TABLE [dbo].[KINGCHEFFBALCAO] (
	[CODIGOFICHA] [varchar] (30) NOT NULL ,
	[NUMEROCONTROLEITEM] [int] NOT NULL ,
	[MESA] [varchar] (20) NULL ,
	[DATAHORACONTROLEPEDIDO] [datetime] NOT NULL ,
	[CODIGOBARRAS] [varchar] (15) NULL ,
	[DESCRICAOPRODUTO] [varchar] (50) NULL ,
	[QUANTIDADE] [float] NULL ,
	[VALORUNITARIO] [real] NULL ,
	[VALORTOTAL] [real] NULL ,
	[ALIQUOTAICMS] [varchar] (30) NULL ,
	[NOMEATENDENTE] [varchar] (50) NULL ,
	[IMPRESSORA] [varchar] (50) NULL 
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[KINGCHEFFBALCAO] WITH NOCHECK ADD 
	CONSTRAINT [PK_KINGCHEFFBALCAO] PRIMARY KEY  NONCLUSTERED 
	(
		[CODIGOFICHA],
		[NUMEROCONTROLEITEM],
		[DATAHORACONTROLEPEDIDO]
	)  ON [PRIMARY] 
GO

