IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='EST_NF_ENT_DANFE_PROVISORIO_PROCESSAMENTO')
 BEGIN
	CREATE TABLE [dbo].[EST_NF_ENT_DANFE_PROVISORIO_PROCESSAMENTO](
		[CD_EMP] [int] NOT NULL,
		[CD_FILIAL] [int] NOT NULL,
		[CD_CTR] [int] NOT NULL,
		[DT_CAD] [datetime] NOT NULL,
	 CONSTRAINT [PK_EST_NF_ENT_DANFE_PROVISORIO_PROCESSAMENTO] PRIMARY KEY CLUSTERED
	(
		[CD_EMP] ASC,
		[CD_FILIAL] ASC,
		[CD_CTR] ASC
	)
	) ON [PRIMARY]
	ALTER TABLE [dbo].[EST_NF_ENT_DANFE_PROVISORIO_PROCESSAMENTO]  WITH CHECK ADD  CONSTRAINT [FK_EST_NF_ENT_DANFE_PROVISORIO_PROCESSAMENTO_EST_NF_ENT_DANFE_PROVISORIO] FOREIGN KEY([CD_CTR])
	REFERENCES [dbo].[EST_NF_ENT_DANFE_PROVISORIO] ([CD_CTR])
END;