IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_EST_PROD_PRECIFICACAO_PRECO_EST_NF_ENT_IT]'))
begin
	ALTER TABLE dbo.EST_PROD_PRECIFICACAO_PRECO
		DROP CONSTRAINT FK_EST_PROD_PRECIFICACAO_PRECO_EST_NF_ENT_IT
end
GO

ALTER TABLE dbo.EST_PROD_PRECIFICACAO_PRECO WITH NOCHECK ADD CONSTRAINT
	FK_EST_PROD_PRECIFICACAO_PRECO_EST_NF_ENT_IT FOREIGN KEY
	(
	CD_EMP,
	CD_FILIAL_ENTRADA,
	CD_NF_ENTRADA,
	CD_PROD
	) REFERENCES dbo.EST_NF_ENT_IT
	(
	CD_EMP,
	CD_FILIAL,
	CD_NF,
	CD_PROD
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 