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