-- Tabela 2
			CREATE TABLE [dbo].[B2C_OCORRENCIA_LOG](
				[ID_OCORRENCIA] [int] NOT NULL,
				[ID_LOG] [int] NOT NULL,
				[CAIXA_VENDEDOR] [char](4) NOT NULL,
				[DATA_LOG] [datetime] NOT NULL,
				[ID_STATUS_OCORRENCIA] [smallint] NOT NULL,
			 CONSTRAINT [XPKB2C_OCORRENCIA_LOG] PRIMARY KEY CLUSTERED 
			(
				[ID_OCORRENCIA] ASC,
				[ID_LOG] ASC
			)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
			) ON [PRIMARY]
			GO

			ALTER TABLE [dbo].[B2C_OCORRENCIA_LOG]  WITH CHECK ADD  CONSTRAINT [XFK_B2C_OCORRENCIA_LOG_B2C_OCORRENCIA] FOREIGN KEY([ID_OCORRENCIA])
			REFERENCES [dbo].[B2C_OCORRENCIA] ([ID_OCORRENCIA])
			ON UPDATE CASCADE
			ON DELETE CASCADE
			GO

			ALTER TABLE [dbo].[B2C_OCORRENCIA_LOG] CHECK CONSTRAINT [XFK_B2C_OCORRENCIA_LOG_B2C_OCORRENCIA]
			GO






