IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_EST_PROD_TBL_COMIS_REGRESSAO_PRC_FILIAL_PRC_FILIAL]'))
begin
	ALTER TABLE [dbo].[EST_PROD_TBL_COMIS_REGRESSAO_PRC_FILIAL] DROP CONSTRAINT [FK_EST_PROD_TBL_COMIS_REGRESSAO_PRC_FILIAL_PRC_FILIAL]
end
ALTER TABLE dbo.EST_PROD_TBL_COMIS_REGRESSAO_PRC_FILIAL ADD CONSTRAINT
	FK_EST_PROD_TBL_COMIS_REGRESSAO_PRC_FILIAL_PRC_FILIAL FOREIGN KEY
	(
	CD_EMP,
	CD_FILIAL
	) REFERENCES dbo.PRC_FILIAL
	(
	CD_EMP,
	CD_FILIAL
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 